Tag Archives: Content Management

Save document library as template option not available

Problem

The Save Document Library as Template option is not available on the default Documents library that gets created by the site publishing feature.

Cause

This is a known issue in SP 2010 and a work-around has been provided.

Work-around

Open the document library -> Library Settings

On your address bar, change the link from this:

https://sharepointsite/_layouts/listedit.aspx?List=%7BAE8E37D9%2DCC63%2D4324%2D9A78%2D97D2E5426252%7D

to this:

https://sharepointsite/_layouts/savetmpl.aspx?List=%7BAE8E37D9%2DCC63%2D4324%2D9A78%2D97D2E5426252%7D

You should now be able to save your document library as a template.

Comments ( 0 )

Content Query Webpart – Displaying Richtext

Requirement

Create a content query webpart that pulls data stored in Richtext format. Data must be displayed without html codes.

Solution

Modify the XSLT to use the ‘disable-output-escaping=”yes” tag:

For example: <xsl:value-of select=”@Description” disable-output-escaping=”yes”/>

Comments ( 1 )

Calculated Columns – Week of month

Requirement

Create a calculated column called ‘Progress Report No’ based on the following format:

yyyy.MM.W(WeekOfMonth).

e.g. A report created on 4/8/2011 would be, 2011.8.W1

Solution

The formula for the calculated column is:

=TEXT(Created,”yyyy”)&”.”&MONTH(Created)&”.W”&ROUND((DATEDIF(DATE(YEAR(Created),MONTH(Created),1)-(WEEKDAY(DATE(YEAR(Created),MONTH(Created),1),1))+1,Created+(7-WEEKDAY(Created,2)),”D”)+1)/7,0)

 

Comments ( 1 )

Using Export-SPWeb to export libraries / lists

This is a simple one but many people get the syntax wrong when they try to export individual document libraries / lists.

Syntax:

To backup a document library called ‘Library1’ in ‘Subsite’.

export-spweb <http://sharepoint site/site collection/subsite/ -itemurl “/site collection/subsite/library1” -path c:\sharepoint\library1.cmp

To backup a document library called ‘Library 2’ in ‘Site Collection’.

export-spweb <http://sharepoint site/site collection/ -itemurl “/site collection/library2” -path c:\sharepoint\library2.cmp

Comments ( 2 )

Change content type for all documents in a library

Requirement

An old migrated library is populated with several thousand documents with the default content type set to ‘Document’. All the documents now need to be assigned a specific content type.

Solution

Found a powershell script that does the trick:

http://get-spscripts.com/2010/10/change-content-type-set-on-files-in.html

 

Comments ( 1 )