Blog Archive

SharePoint-courses
José Quinto Zamora

XSLT and SharePoint 2010. Obtaining all visible list fields in Content Query WebPart or XSLTListViewWebPart

2011-04-19 21:45:00 by José Quinto Zamora

When we are editing XSLT for Content Query Web Part, XSLTListViewWebPart or any other WebPart with configurable XSLT, you can obtain all list fields and their values with following code:

 

<xsl:for-each select="@*">
        <br />
        Name: <xsl:value-of select="name()" /> Value:<xsl:value-of select="." />
</xsl:for-each>

 

Note: Notice that @ is the beginning char of any list field.

 

Regards!

Comments

#re: XSLT and SharePoint 2010. Obtaining all visible list fields in Content Query WebPart or XSLTListViewWebPart
Tuesday, May 24, 2011 - 08:09 PM by Bobby
Where do we specify the list. Or How do we link the xslt to a specific SharePoint 2010 list
#Re: XSLT and SharePoint 2010. Obtaining all visible list fields in Content Query WebPart or XSLTListViewWebPart
Tuesday, May 24, 2011 - 08:38 PM by JQ
Hi Bobby, You can use this code in XSLTListViewWEbPart, you have a complete sample here: http://blogs.solidq.com/sharepoint/Post.aspx?ID=71&title=Custom%20XSLT%20para%20XsltListViewWebPart
#re: XSLT and SharePoint 2010. Obtaining all visible list fields in Content Query WebPart or XSLTListViewWebPart
Wednesday, May 25, 2011 - 04:27 AM by Booby
Is there a way to add the XSLT Data View web part without the use of SharePoint Designer. For example, how would you create a web part that renders xslt based on a provided sharepoint list. At client, we may not able to use Designer. Thanks José
#re: XSLT and SharePoint 2010. Obtaining all visible list fields in Content Query WebPart or XSLTListViewWebPart
Monday, July 4, 2011 - 06:05 PM by José Quinto
Hi Bobby, you can create custom xslt webpart: http://blogs.solidq.com/sharepoint/Post.aspx?ID=107&title=Building+customized+SharePoint+2010+Web+Parts+using+XSLT+and+XML
Leave a Comment
(*) Title:
(*) Name:
Your URL:
(*) Comments:
Follow us on: