I 've created a docType with a dropdown-field in which the user can select a "genre". The dropdown is a dataType. In XSLT I can sort the pages on genre, but it shows all the genres in a long list.
Your XSLT currently is doing exactly what you are asking it to do, list all the ccAct nodes sorted by ccGenre
I don't think you need to loop through the Genres on your display page, you just need to show the genre that the user selected in the umbraco back end for that doc type right?
To keep it easy you could use the XSLT that you have above however you need to add an IF statement to only show the genre which relates to the page you are on.
In puesdo code
<xsl:for-each select="./node/node[@nodeTypeAlias = 'ccAct']> If the current page genre = the genre in the loop then
display genre
otherwise
don't display anything
</xsl:for-each>
Show ID from dropdown list
I 've created a docType with a dropdown-field in which the user can select a "genre". The dropdown is a dataType. In XSLT I can sort the pages on genre, but it shows all the genres in a long list.
...
Is it possible to show only a certain ID?
Thanks,
Ralph
Hi Ralph,
Yes, it's possible.
Your XSLT currently is doing exactly what you are asking it to do, list all the ccAct nodes sorted by ccGenre
I don't think you need to loop through the Genres on your display page, you just need to show the genre that the user selected in the umbraco back end for that doc type right?
To keep it easy you could use the XSLT that you have above however you need to add an IF statement to only show the genre which relates to the page you are on.
In puesdo code
Best of luck
Rich
Thanks Rich, I'll give it a try!
Best of luck, post back if you can't get it working.
is working on a reply...