views:

326

answers:

1

I'm 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'd 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've 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.

Any help much appreciated!

[Edit] found the solution - fields aren't listed in the item xml if they're empty!

+1  A: 

Having had a break from this, I've realised the answer: empty fields are not listed in the item XML!

adam