Archive for April, 2009
DataViewWebPart (DVWP) show unique Items only
Apr 22nd
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.
MOSS 07: Show an Image thumbnail in search result
Apr 22nd
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>
Tip: SharePoint KB
Apr 22nd
http://sharepointkb.org/Main_Page
This might become something good one day, but right now it needs some more substance.
Marc D Anderson: Firing an Event When a User Selects a Value from a Data View Web Part Dropdown
Apr 14th
Abduzeedo.com: Daily Inspiration #165
Apr 9th
This post is part of our daily series of posts showing the most inspiring images selected by some of the Abduzeedo’s writers and users.
Download SharePoint Designer 2007 for free
Apr 9th
SPD 07 is now available for download.
http://msdn.microsoft.com/sv-se/evalcenter/bb190710(en-us).aspx
We have implemented a number of changes to promote and facilitate even more customization efforts on top of the SharePoint platform including making SharePoint Designer 2007 available as a free download. For more information visit our SharePoint Designer web page.
Add “Add Attachment” – functionality to a MOSS2007 Blog (Posts)
Apr 7th
I came across this blog post about how to add the “Add Attachment” functionallity to your blog on MOSS 07,
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
How to show Attachments with DataFormWebPart
Apr 7th
Found this great post that simply explains how to show a link to your attached files from a list in a DVWP. this solution workes like a charm.
http://blogs.msdn.com/dmp/archive/2009/01/21/how-to-show-attachments-with-dataformwebpart.aspx


Recent Comments