Adam Hopkinson
Adam Hopkinson

Reputation: 28795

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:

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

Upvotes: 3

Views: 1131

Answers (1)

Adam Hopkinson
Adam Hopkinson

Reputation: 28795

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

Upvotes: 4

Related Questions