DataView WebPart / XSLT Customer Parameter Bindings and using its data

To introduce a customer parameter, simply use the dialog:

image

 

after creating a new parameter, ensure that the xslt has the following entries:

1. At the bottom:

<ParameterBinding Name="TitleInner" Location="None" DefaultValue="Our Clients"/>

2. At start:

<xsl:param name="TitleInner">Our Clients</xsl:param>

 

Then you can consume/use the parameter as follows:

<div class="col-lg-12">
  <h2><xsl:value-of select="$TitleInner" /></h2>
   <hr />
</div>

Formatting Number value with Percentage Mark (sign)

<td>
              <xsl:call-template name="percentformat">
                <xsl:with-param name="percent"
                     select="@_x007B_1585273a_x002D_2f76_x002D_47f7_x002D_9170_x002D_adc12250ce65_x007D_"/>
                  </xsl:call-template>
          </td>

    <xsl:template name="percentformat">
      <xsl:param name="percent"/>
      <xsl:value-of
         select="format-number($percent, ‘#,##0%;-#,##0%’)" />
    </xsl:template>

Setting up Document Expiration and Retention Policies for Libraries in SharePoint 2010

The following could be useful for someone who is trying to setup a Document Expiration and Retention Policies for a library in SharePoint 2010:

Check List:

1. Central Administrator should have retention enabled for sites created:

Central Administration > Security > Information policy > Configure Information Management Policy > Retention [Available for use in new site and list policies]

2. “Information Management Policy” and “Expiration Policy” are the two timer jobs which are responsible for retention policy. By default both will work “Weekly”, change this to suite your need.

Note: Set the recurring schedule in such a way that “Information Management Policy” job should run before the “Expiration Policy”.

[For testing purposes, you can either execute “Run Now” or set a shorter interval like every 5 minutes]

Steps to configure an Expiration Policy as below:

1. [Designated Document Library] > Document Library Settings > Information management policy settings >

a. Library and Folders (Change source or configure library schedule) > [Select Library and Folders].

b. Add a retention stage… > “This stage is based off a date property of the item Time Period :” Created + e.g. 0 days (for immediate action) > Action [Select Move to Recycle Bin]

c. Press OK/Apply to save the changes.

2. Add a document to the [Designated Document Library] and wait for the “Expiration Policy” timer job to execute.

That’s it; you should see that the item has been moved to the recycle bin.

Setting Expiration Dates

In SharePoint 2010, you have the option to set an expiration time based on any date property available in the drop-down list shown in Figure 8-5, including when it was declared a record. You can specify values between 0 to 500 years, 0 to 6000 months, or 0 to 182,500 days from the date selected from the drop-down list. In reality, all three settings have the same maximum amount of time, so your choice of which to select is really based on how precise you want the date setting to be. Selecting days will give you a more precise setting than months, and months will be more precise than years. The precision of the retention period required by your organization should be determined by your legal team.

Related references:

Retention Policy for document library in SharePoint 2010

http://weblogs.asp.net/sreejukg/archive/2010/11/11/retention-policy-for-document-library-in-sharepoint-2010.aspx

Creating a retention policy to start a workflow in SharePoint 2010 using PowerShell

http://get-spscripts.com/2011/08/creating-retention-policy-to-start.html

Bulk provisioning SharePoint 2010 document retention policies using PowerShell:

http://www.sharemuch.com/2011/04/11/bulk-provisioning-sharepoint-2010-document-retention-policies-using-powershell/

Add a workflow to a SharePoint list in all sites of a site collection using PowerShell

http://get-spscripts.com/2010/08/add-workflow-to-sharepoint-list-in-all.html

Applying v4.MasterPage as a Search Center MasterPage

Read It

Last week when I was working on a client project I had a requirement of applying v4.masterpage into Search Center as the search center was disconnected from rest of the site collection for its global navigation. So during my search for a solution I came across this useful link “Converting a Custom SharePoint 2010 Master Page into a Search Center Master Page” posted by Randi Drisgill. This blog was simply listing the steps required to achieve what I wanted. So I went ahead and applied the steps mentioned in there. Everything went well and thanks to Randi.

Once after completing the steps mentioned in there, I started performing some basic tests and oops, I came across two bickering issues:

  1. The search box was found to be left aligned which was different to the alignment set in OOB.
  2. When page loads an additional ribbon row gets displayed momentarily and disappeared.

Let’s Fix

So I had to work on finding a solution for both the issues before releasing the solution.

  1. Fixing Issues# 1: I had to remove the style attribute (in the masterpage) margin:inherit as shown below:

    .srch-sb-results4 {
               margin: inherit;
               padding-left: 20px;
    }

  2. Fixing Issue# 2: A <div> tag should be introduced with style set to display:none surrounding the  “notificationArea” div.

<div style="display:none">
       <div id="notificationArea">
       </div>
       <asp:ContentPlaceHolder ID="SPNavigation" runat="server">
                     <SharePoint:DelegateControl runat="server" ControlId="PublishingConsole" Id="PublishingConsoleDelegate">
                     </SharePoint:DelegateControl>
       </asp:ContentPlaceHolder>
</div>

That’s all you need in addition to what Randi Drisgill already provided.

FinallySearch Center