22
Apr
SharePoint 2007 | 1 Comment »
I’ve been trying to display only unique items from a list for some time now. I found a way through someones blog but I can’t seem to remember wich one..
Anyway, to do this set a sort on the column you want to show in SPD. eg. Sort by Title.
Then in the template for dvt_1.body add the following code after $Rows
<xsl:template name=”dvt_1.body”>
<xsl:param name=”Rows”/>
<xsl:for-each select=”$Rows[not(@Title = preceding-sibling::*/@Title)]“>
<xsl:call-template name=”dvt_1.rowview”/>
</xsl:for-each>
</xsl:template>
This will check the preceeding sibling if it has the same name and if so It won’t display that Item and only the first “unique” item will be displayed. I use this alot for eg. when doing a A – Z filter webpart etc.
22
Apr
SharePoint 2007 | No Comments »
Found this blog (novolucos.com) about adding an Image thumbnail to your moss 07 search result. Pretty straight forward.
http://www.novolocus.com/2008/05/22/showing-thumbnails-in-search/
Basically enter the following code in the Result template in the xsl code of the Search core web part. Below the xsl:choose for the highlighting of the title. Pictures and eg. in blog linked before.
<xsl:choose>
<xsl:when test=”contentclass[. = 'STS_ListItem_PictureLibrary'] and picturethumbnailurl[. != '']“>
<div>
<a href=”{$url}” id=”{concat(‘CSR_’,$id)}” title=”{$url}”>
<img src=”{picturethumbnailurl}” alt=”"/>
</a>
</div>
</xsl:when>
</xsl:choose>
07
Apr
SharePoint 2007 | No Comments »
I came across this blog post about how to add the “Add Attachment” functionallity to your blog on MOSS 07,
http://www.konfabulieren.com/2007/08/23/howto-add-add-attachment-functionality-to-a-moss2007-blog-posts/
Simply edit the following file in eg. notepad. (Make sure to crete a backup of the original)
located @ C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\SiteTemplates\Blog\Lists\Posts\schema.xml
Remove below code in red:
<Forms>
<Form Type="DisplayForm" Url="ViewPost.aspx" WebPartZoneID="Main" />
<Form Type="EditForm" Url="EditPost.aspx" ToolbarTemplate="BlogEditFormToolBar" Template="BlogForm" WebPartZoneID="Main" />
<Form Type="NewForm" Url="NewPost.aspx" ToolbarTemplate="BlogNewFormToolBar" Template="BlogForm" WebPartZoneID="Main" />
</Forms>
So it looks like:
<Forms>
<Form Type="DisplayForm" Url="ViewPost.aspx" WebPartZoneID="Main" />
<Form Type="EditForm" Url="EditPost.aspx" WebPartZoneID="Main" />
<Form Type="NewForm" Url="NewPost.aspx" WebPartZoneID="Main" />
</Forms>
If you want to display the attached files in your post please convert the Wep Part in your post.aspx that shows the “post” to an XSLT DVWP.
Fix the Author problem by removing the = character before =@Author and thenfollow the guide below:
Now you have to open the post.aspx of your SharePoint 2007 blog and add the code linked from :
http://blogs.msdn.com/dmp/archive/2009/01/21/how-to-show-attachments-with-dataformwebpart.aspx
Recent Comments