if you edit the template from within umbraco, you can click the button on top (the one next to the save button) to insert a umbraco-field. In the popup, you can define which property you want to show. You'll note that some properties you are familiar with in xslt have a different naming in here. So, for the Id, you'd use:
When you click the 'insert field' button on the toolbar of the template editor you'll get a dropdown list of all the fields you can choose. Those with an @ symbol are 'builtin' items. You'll be able to get the pageName (aka, @nodeName in xslt), the id, level, etc.
Wow, "writerName" actually does return the "creatorName" from the XML and not the actual "writerName", as one would expect. How unintuitive. However, I still love Umbraco! Thanks guys.
How do I use <umbraco:item> to get the "id" of a content node (or other node level attributes)?
I am trying to get the "id" of a node in a Master Page template. I was thinking I could use:
<umbraco:Item runat="server" field="id" />
How do I get these node level attributes for use on a Master Page without using a macro?
Hi,
if you edit the template from within umbraco, you can click the button on top (the one next to the save button) to insert a umbraco-field. In the popup, you can define which property you want to show. You'll note that some properties you are familiar with in xslt have a different naming in here. So, for the Id, you'd use:
When you click the 'insert field' button on the toolbar of the template editor you'll get a dropdown list of all the fields you can choose. Those with an @ symbol are 'builtin' items. You'll be able to get the pageName (aka, @nodeName in xslt), the id, level, etc.
Shout if you have any problems.
cheers,
doug.
Haha... Peter beat me by 40 seconds! What a great community, eh?
d.
I finally made it :P
Awesome info, thanks guys. I see how to get most properties, but I still can't seem to get "creatorName"...how would I get that attribute?
Thanks
That would probably be @writerName (everything starting with a @ are default properties from umbraco)
Peter
Wow, "writerName" actually does return the "creatorName" from the XML and not the actual "writerName", as one would expect. How unintuitive. However, I still love Umbraco! Thanks guys.
Woops, no, I was wrong...writerName DOES return the "writerName" from the XML...Does anyone know how to get the "creatorName"?
is working on a reply...