get Content Type using XSLT or velocity
Is there a way, either using XSLT or velocity, to get the name/path/id of the content type of a page?
Discussions are closed to public comments.
If you need help with Cascade CMS please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Ryan Griffith on 21 Sep, 2015 07:25 PM
Hi,
Currently it is only possible to obtain the Page's Data Definition Path, but not the Content Type. Depending on your use case, the Query API would allow you to filter pages by a specific Content Type.
We are looking into adding to the API, so this could be something to consider. Would you be able to provide your use case so we can get an idea of how it would be used?
Thanks!
2 Posted by thugsb on 21 Sep, 2015 08:22 PM
I was trying to test a setting in the DD against the name of the Content Type (they should match. I solved this by using this code (the useMetadata is just used to trim down the matches):
thugsb closed this discussion on 21 Sep, 2015 08:22 PM.