Wednesday, February 22, 2012

SharePoint lytebox with link to dispform.aspx

Building on the work of the codeplex project:
http://lyteboxsp.codeplex.com/

Note to change the Title/link of the webpart, modify the parameters binding either on the web or in designer. The binding must match the name of the library, not the url.

I updated the code slightly in the dataview to include a link to the dispform.aspx for the picture. It seems the key is to write the link with escaped characters.  I also update the javascript to ver 5.5

Also, you can update preferences for lytebox in the section "data-lyte-options"

---Copy and Replace below in the Dataview----
<a> <xsl:attribute name="href"> <xsl:choose> <xsl:when test="starts-with(@FileRef, '/')"> <xsl:value-of select="@FileRef"> </xsl:value-of></xsl:when> <xsl:otherwise> <xsl:value-of select="concat(&quot;/&quot;,@FileRef)"> </xsl:value-of></xsl:otherwise> </xsl:choose> </xsl:attribute>
<xsl:attribute name="class">lytebox</xsl:attribute> <xsl:attribute name="data-lyte-options">autoResize:true slide:true group:name slideInterval:6000 showNavigation:true</xsl:attribute> <xsl:attribute name="data-title">Title:<xsl:value-of select="@Title"></xsl:value-of></xsl:attribute><xsl:attribute name="data-description"> Description: <xsl:value-of select="@Description"> ; Link: &lt;a href="/<xsl:value-of select="@FileDirRef">/Forms/DispForm.aspx?ID=<xsl:value-of select="@ID">" target="_parent"&gt; See more details &lt;/a&gt;  </xsl:value-of></xsl:value-of></xsl:value-of></xsl:attribute> <img style="border: 3px solid white; margin: 5px;" src="" />    <xsl:attribute name="src">        <xsl:value-of select="concat(&quot;/&quot;,@FileDirRef,&quot;/_t/&quot;,translate(@FileLeafRef, &quot;.&quot;, &quot;_&quot;),&quot;.&quot;,@FileType)">    </xsl:value-of></xsl:attribute>
</a>

Friday, February 10, 2012

Personalization within SharePoint 2010 - Allow Personalization of a Single Page - Blog

Personalization within SharePoint 2010 - Allow Personalization of a Single Page - Blog:

'via Blog this'

Show Quick Launch on SharePoint 2010 Webpart Page

A dies in vita: Show Quick Launch on SharePoint 2010 Webpart Page: "body #s4-leftpanel"

'via Blog this'

With SharePoint 2007 all you needed to do was edit the page in SharePoint Designer and remove the following 2 lines:

< asp:Content ContentPlaceHolderId="PlaceHolderNavSpacer" runat="server">
< asp:Content ContentPlaceHolderId="PlaceHolderLeftNavBar" runat="server">

With SharePoint 2010 you also need to delete the following:

< style type="text/css">
body #s4-leftpanel {
display:none;
}
.s4-ca {
margin-left:0px;
}