Archive for the ‘SharePoint’ Category

How to Change the Site Logo in SharePoint 2010

Great walk though, here:

sharepointadam.com

SharePoint 2010 CSS and Master Pages

This course describes how to implement and brand a SharePoint based public website using SharePoint web content management (WCM). After the course is completed, you may be able to implement a SharePoint deployment of a branded website with structured content management. You may also be able to successfully plan, deploy, monitor, and maintain an Internet site. No development experience is required, but experience with HTML and CSS is recommended.

Original:

technet.microsoft.com

How Do I: Use the SharePoint 2010 Managed MetaData Service?

A great video that shows how to setup a Managed Metadata Service within SharePoint 2010.

technet.microsoft.com/

Demonstrates how to:

  • Create a new Managed MetaData Service
  • Specify a site collection as a content hub
  • How to configure other site collections to subscribe to the hub's meta data
  • How to create metadata term sets using the TaxonomyTerm Set tool
  • How to create a content type the utilizes term sets
  • How to publish a content type to make it available to subscribing sites
  • How to force propagation of meta data updates

Install SharePoint 2010 – Step by Step

The following video shows you step-by-step how to setup requirements like Windows Server 2008 R2, including roles and features, administrative and service accounts, the installation and configuration of SQL Server 2008 R2, as well as how to install SharePoint.

Original Post:
sharepoint-tutorial.net

Displaying FileType Icons

For Attachments in a Data View

Note: Data Source must be SOAP.

1) Modify the DataSource QueryOptions parameters:
Create a Data View that pulls from a list via a data source. Add at least a title and attachment column to the view.

a. In the code, search for the line starting with:

SharePoint:SoapDataSource

On the same line you shall see something like:

</listName></GetListItems></soap:Body>

b. Add the parameter requesting the attachments URL:

<queryOptions><QueryOptions><IncludeAttachmentUrls>TRUE</IncludeAttachmentUrls></QueryOptions></queryOptions>

c. You should end up with this:

</listName><queryOptions><QueryOptions><IncludeAttachmentUrls>TRUE</IncludeAttachmentUrls></QueryOptions></queryOptions></GetListItems></soap:Body>

d. Save the page and check the result in the design view:

The ows_attachments field now contains the attachments URLs or 0 for list items with no attachments using the following format:

;#http://moss/Lists/MyList/Attachments/1/Piece.txt;#http://moss/Lists/...

We still need to make some nice links out of this field.

2) Modify the XSL Presentation:
We first create a XSL template to transform the string given by the Web Service into a nice series of picture. You might use my sample below, paste this piece of code in the XSL part of the aspx page you are editing in SharePoint Designer (maybe just before the node “</xsl:stylesheet>”).

Note: Apply the following to the 2nd instance of “</xsl:stylesheet>” in your page (should be around the middle).

<xsl:template name="SplitAttachments">
<xsl:param name="str"/>
<xsl:choose>
<xsl:when test="contains($str,';#')">
<xsl:variable name="attachmentUrl" select="substring-before($str,';#')"/>
<xsl:if test="string-length($attachmentUrl) != 0">
<a href="{$attachmentUrl}"><img style="border:0px" src="/_layouts/images/attach.gif" alt='Open'/></a>
</xsl:if>
<xsl:call-template name="SplitAttachments">
<xsl:with-param name="str" select="substring-after($str,';#')" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

This XSL template uses a recursive template to parse the attachments and generate corresponding links and pictures.

a. Now replace

<xsl:value-of select="@ows_Attachments"/>

With

<xsl:call-template name="SplitAttachments">
<xsl:with-param name="str" select="@ows_Attachments" />
</xsl:call-template>

And you should see this:

The paper clip icon you see are actually pointing to the attachments.

3) Display File Type Icons (instead of Paperclips):
The XSL extension provided by WSS (default prefix used by SharePoint Designer is DDWRT) can handle this through a MapToIcon template. If you give a file extension to this template, it will return the icon filename corresponding to this filetype.

Using the substring-after method to get the filetype we can imagine replacing:

/_layouts/images/attach.gif

With

/_layouts/images/{ddwrt:MapToIcon('', ddwrt:GetFileExtension(string($attachmentUrl)))}

4) Including a Tooltip description (Optional Hover over pop-up):
The full line of code, including a dynamic tooltip title lookup, is as follows:

<a target="_blank" title="Open: {substring-after((substring-after($attachmentUrl, 'Attachments')), '/')}" href="{$attachmentUrl}"><img style="border:0px" src="/_layouts/images/{ddwrt:MapToIcon('', ddwrt:GetFileExtension(string($attachmentUrl)))}" alt='Attachment'/></a>

a. Displaying FileType icons for files contained in a Doc Lib
If you're dealing with files other than attachments to a list item, you can modify your code as follows:

<img alt="Type" src="/_layouts/images/{ddwrt:MapToIcon('', ddwrt:GetFileExtension(string(@FileLeafRef)))}">

5) If you are trying to map an icon for a file extension that is not supported OOTB, you can add support for it in the "DOCICON.XML" file located in "C:/Program Files/Common Files/Microsoft Shared/web server extensions/14/TEMPLATE/XML" directory on the SharePoint Web server.  For example, to add support for VNC attachments, I first uploaded my vnc.png icon image to "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\IMAGES" directory, and then added the following line into the "DOCICON.XML" file referenced above, like so:

<Mapping Key="vnc" Value="vnc.png"/> 

Finally, to ensure any end user browser handles the file extension properly (i.e. not opening the file as text in the browser), you may want to add a MIME Type support for the extension in the IIS Manger, such as:

  • File name extension: .vnc
  • MIME Type: application/x-vnc

Once all of this is completed, iisreset for the changes to take effect.

Original(s):
blog.jonathanroussel.com
blog.jonathanroussel.com (more)
sympmarc.com
msdn.microsoft.com

 

Return top