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 … 🙂

Advertisements

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:

WordPress.com Logo

You are commenting using your WordPress.com 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 )

w

Connecting to %s