AndyGett
Andy Gettings is the president of Bullseye Consulting which develops and manages customized SharePoint applications and other software and databases for businesses. More
Microsoft Certified Technology Specialist

Microsoft Office SharePoint Server 2007 Configuration


RSS Feed Feed your read!

Archives

July 2008 (12)
August 2008 (1)
September 2008 (1)
October 2008 (2)
January 2009 (2)
April 2009 (1)

Links

Archive
Archive (Calendar)
@AndyGett Twitter
AndyGett LinkedIn
Bullseye Consulting

Tag Cloud

Family, M4300, Recreation, SharePoint, Technology, Virtualization,

Link to Slide Show from Pictures DVWP Rollup 

Tags:

In addition to the blog rollup’s (see previous post), I am rolling up my top-level picture folders in a picture library called Pictures.  We thought the best user experience would be viewing the slide shows of a particular library.  I was adding a label of “In the Photo Album menu, click Actions > View Slide Show”, but the menu is hard to find, and jeez, Andy, can’t you just make the link go straight to the slide show instead of linking to the thumbnails?  Well, the answer is “yes”.

There is a slideshow.aspx page in the Forms subfolder of picture libraries.  It takes a query-string parameter named RootFolder to know where to start.  Since all my “albums” are one level deep (no nesting of folders), the items returned by the data source are all we need.  @FileRef field contains the “URL Path” of the item.  So the link of our <a> tag generated by the DataForm WebPart’s XSL needs to look something line /Pictures/Forms/slideshow.aspx&RootFolder={@FileRef}.    After some playing around, this does the trick:

  <a target="_blank" title="View slide show in new window">

    <xsl:attribute name="href">

      <xsl:value-of select="concat('/Pictures/Forms/slidshow.aspx?ViewStyle=slideshow&amp;RootFolder=',@FileRef)" />

    </xsl:attribute>

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

  </a>


I still like the idea of having the thumbnail, so I added

<a href="{@FileRef}"><img border="0" src="/_layouts/images/DETAIL.GIF" title="View Thumbnails"/></a>&#160;


before the slideshow link within the same column.  Note that &nbps; must be explicitly defined in XSL.  Using &#160; instead is easier.  Detail.gif is OOTB SharePoint graphic that seemed to capture the idea of a grid of thumbnails.

To round it all out, I show the created date sans time stamp of the album, right justified in the second column:

<xsl:value-of select="ddwrt:FormatDate(string(@Created), 1033, 1)"/>
 
Posted by AndyGett on 30-Sep-08
1 Comments  |  Trackback Url  |  Link to this post | Bookmark this post with:        
 

Links to this post

Comments

Name:
URL:
Email:
Comments: