Search code examples
content-management-systemxsltfieldsitecore

Using XSL to list all fields of an item in Sitecore CMS


I am using a debug device in sitecore (6) that will output a 'developer' view of a page when the url is appended with a certain query string (which activates the device). On the page, I have item name, template, branch master, workflow info etc.

I would like to list all the fields on the item using the xsl render - preferably not including the hidden (__) fields, but doesn't matter if they are there.

I have tried:

<xsl:for-each select="$sc_item/fields/field">

but this only lists five fields for each item:

  • __created
  • __revision
  • __updated
  • __updated by
  • __lock

The sitecore docs say use the sc functionality to access field values, but I need to get the field names first.


Solution

  • I have realized the answer: empty fields are not listed in the item XML!