Insert Document Icon into DVWP

I found this post on Marc D. Anderson’s Blog that illustrates how to insert the document icon into the DVWP before the name of a document.  Very simply, you just insert 

<img alt="Type" src="/_layouts/images/{ddwrt:MapToIcon('', ddwrt:GetFileExtension(string(@FileLeafRef)))}"/>

before the code of the document name.

… if all things could be that easy … 🙂


About Inge Rush

I love using SharePoint to create business solutions. I am not a SharePoint administrator or .net developer (although I dabble a bit). I just learn on-the-job as I solve problems.
This entry was posted in SharePoint 2010, Web Design and tagged , , . Bookmark the permalink.

One Response to Insert Document Icon into DVWP

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s