Archive

Archive for the ‘sharepoint’ Category

Interview: Sing Chan on branding for SharePoint 2010

March 9th, 2010

You know that feeling when you finish your next public website that will be visited by hundreds and thousands of people each day, well, neither do I but I can imagine; that’s why I decided to talk to Sing today (his blog http://www.singchan.com) and figure out his process and what tools he’s using. We focused on SharePoint 2010 but there are general guidances too that you can use in any website production process. Check it out – 12 min!

Sing Chan on general and SharePoint 2010 branding from Yaroslav Pentsarskyy on Vimeo.

sharepoint, sharepoint 2010 ,

Removing metadata from SharePoint 2010 search results

March 8th, 2010

Recently I have been involved in a solution where I needed to customize my Search Core Results webpart. In short; I had to remove Created By and replace it with a piece of metadata called alias.

Seems like a trivial task – all you need to do is to adjust XSL of the Search Core Results and remove or replace Author field, but there is a catch.

First, open your Search Core Results XSL:

xsl editor

I recomment you copy and paste the contents of the XSL editor into notepad (at least) and find the following section:

<!– Main body template. Sets the Results view (Relevance or date) options –>

this section denotes a start of the XSL responsible for rendering the body of the results. In here you will find all of the components that put together a search result. In my case I found and replaced the document author retrieval  implementation with the following:

<xsl:call-template name=”DisplayAuthors”>
<xsl:with-param name=”alias” select=”alias” />
</xsl:call-template>

<xsl:call-template name=”DisplayAuthors”>

<xsl:with-param name=”alias” select=”alias” />

</xsl:call-template>

After the XSL was saved, this worked well but I was still getting the actual CreatedBy in my search results. The created by information turned out to be coming from  the property called hithighlightedsummary

If you take a look at the definition of this property in your search service application: http://[central admin url]/_admin/search/listmanagedproperties.aspx

you will notice that hithighlightedsummary doesn`t have any of the crawled properties defined explicitly. In fact, this property is a dynamic summary that has a collection of highlighted word pieces that best describe the result and give user the text around the keywords they were searching. Among those calculated pieces of metadata we have CreatedBy and any other relevant metadata.

This means that no matter how much you customize your XSL – you will still receive some parts of the metadata as part of the hithighlightedsummary . One compromise is to remove this property from your XSL and replace it with a item description, body, or any other metadata that is relevant in your case.

Here is the template and selector that call hithighlightedsummary  from the XSL:

<xsl:when test=”hithighlightedsummary[. != '']“>

<xsl:call-template name=”HitHighlighting”>

<xsl:with-param name=”hh” select=”hithighlightedsummary” />

</xsl:call-template>

</xsl:when>

To create your new custom summary field you would define the managed property that will incorporate relevant crawled properties in here: http://[central admin url]/_admin/search/listmanagedproperties.aspx and then reference it in the template as shown above.

Don`t forget to include your newly created managed property in a list of fetched columns  within your Search Core Results:

fetched columns

Good luck!

sharepoint, sharepoint 2010 , , , ,

Dynamically changing SharePoint 2010 list form rendering templates

March 6th, 2010

Here is the scenario: you have few lists in your portal that`s already deployed in production environment and contain data. Here you realize that you need to adjust one of the lists` rendering template to remove some information on a Displayor Edit form.  You can`t change the schema.xml of the list because you will have to recreate the it and your customer will loose all the data.

Assuming you already have a rendering template ready or have just deplo0yed it – here is one quick way to rescue the day:

1. Open site in SharePoint Designer.

2. Click Lists and Libraries.

3. Click on the list you`d like to change the template on (Comments in my example)

attachment.ashx

4. Select the View of your interest, in my case I`ll be changing Display Form (ViewComments.aspx in case of Comments list)

attachment.ashx (1)

5. The designer will load the view. Make sure you pick a split view to see visual and code of the form.

attachment.ashx (2)

6. Click on the form as shown below, that way SharePoint Designer will show the piece of code representing the display form webpart.

attachment.ashx (3)

7. In the “code” window find TemplateName in the highlighted section and find the “ListForm” property in that section and replace it with the rendering template that you have provisioned to the site.

That`s it, when done, just save the form and refresh the actual form page in your browser – the new form will be picked up right away.

attachment.ashx (4)

Good luck!

sharepoint, sharepoint 2010 , ,

Interview: SharePoint 2010 from Visual Design standpoint

March 4th, 2010

Today I had short but very interesting interview with Kurtis Beard, from Habanero Consulting. Kurtis is an Interaction Designer and stands behind some of the most stunning site designs. Kurtis has been involved in creating design for few SharePoint 2010 projects and has some valuable insights on what to look out for as well as some general strategies when designing for SharePoint 2010. The interview is about 13 min and you`ll find it very informative. Enjoy!

Interview with Kurtis: SharePoint 2010 Insights from Visual Designer from Yaroslav Pentsarskyy on Vimeo.

sharepoint, sharepoint 2010 ,