Clippy Jr.
October 27, 2010 Leave a comment
Just a short post on the offspring of Clippy – Clippy Jr. You know him well, even if you do not think so. He exists within SharePoint. Don’t believe me? He’s been hiding in plain sight the whole time! Just look at the images taken by a private detective below. I promise, these are not doctored (except for the arrows… those definitely were not in the original images.)
See? There he is! Right in the title bar below the toolbar within this list view!
There he is again, on your new list item form!
And again, hanging out next to your list items! Always trying to let you know something. However, Clippy Jr. has definitely learned a few things from this mistakes of his father, Clippy Sr.
Ok, now to get onto the meat and potatoes of this post. No, this is not to let you know that there is an attachments for icons, but, a simple little piece of XSL that can be used in your dataview web parts to denote if there are attachments on a list item or not, and then, show Clippy Jr., happily telling you that there is an attachment on the item.
1: <xsl:if test="@Attachments!='0'">
2: <center><img src="/_layouts/images/attach.gif" /></center>
3: </xsl:if>
And that is all there is to it! @Attachments returns a boolean value that will either be a value of 0, if there are NOT attachments on the list item, or, 1 if there are.
Simple, straight-forward, and extremely handy. Thank you Clippy Jr.!