Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
This seems really simple but I can't work out how to do it - maybe I'm missing something...
Is it possible to get the node ID of a template from its alias or name?
I've tried GetItem and GetXmlNodeById from the Umbraco library.
Do you wan't the template id on the node that you currently stand on, or what do you mean?
As far as I am aware, there is not a library method.
You can however use
umbraco.cms.businesslogic.template.Template.GetByAlias('alias').Id
You will need to make an extension for this if you want to use it in XSLT
@Kim I wanted to get the node ID of any template given its alias
@Casey Thanks! Thanks exactly what I was after!
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Get Template ID
This seems really simple but I can't work out how to do it - maybe I'm missing something...
Is it possible to get the node ID of a template from its alias or name?
I've tried GetItem and GetXmlNodeById from the Umbraco library.
Do you wan't the template id on the node that you currently stand on, or what do you mean?
As far as I am aware, there is not a library method.
You can however use
You will need to make an extension for this if you want to use it in XSLT
@Kim I wanted to get the node ID of any template given its alias
@Casey Thanks! Thanks exactly what I was after!
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.