Depends on your dropdown configuration, if you're using the "Dropdown list", then the text will be stored in the published xml, if you're using a "Dropdown list, publishing keys", then values will be stored rather than the text.
<xsl:for-each select="$currentPage/* [@isDoc and showInFooter = 'Contact']">...</xsl:for-each>
will only display child docs of current page being requested where the value of the dropdown was set to 'Contact'.
well, change your select statement to start from top level node...
<xsl:for-each select="$currentPage/ancestor-or-self::* [@level = 1]//* [@isDoc and showInFooter = 'Contact']">...</xsl:for-each>
Above snippet traverses your xml back to the top level node and then iterates all nodes (regardless of level - hence the double slash) and finds all documents that have a property with a value = 'Contact'
Oh sure, that's possible, and you'll need some xslt functions such as count(), and some functions to find out current position in a loop (first(), last(), position()). Just make a little effort to write some basic xslt already, and we'll help you out when you're stuck.
Look for dropdown value inside the xslt
hello,
i created a new document type with a dropdown list with prevalues. The name of the dropdown is "showInFooter" and the values are "Contact, Home, etc"
Now i want to write a macro where only items are displayed that have got the value "Contact" for example.
How can this be done?
Thanks
Depends on your dropdown configuration, if you're using the "Dropdown list", then the text will be stored in the published xml, if you're using a "Dropdown list, publishing keys", then values will be stored rather than the text.
will only display child docs of current page being requested where the value of the dropdown was set to 'Contact'.
Hope this helps.
Regards,
/Dirk
thanks,
but i dont need the current page i need all pages with the value "Contact" not only from the current page
well, change your select statement to start from top level node...
Above snippet traverses your xml back to the top level node and then iterates all nodes (regardless of level - hence the double slash) and finds all documents that have a property with a value = 'Contact'
Hope this helps.
Regards,
/Dirk
ok thanks this is great,
now i have to count the items and after 5 icons i need to close a div and open a new div. Is this possible?
thanks
Oh sure, that's possible, and you'll need some xslt functions such as count(), and some functions to find out current position in a loop (first(), last(), position()). Just make a little effort to write some basic xslt already, and we'll help you out when you're stuck.
Hope this helps.
Regards,
/Dirk
is working on a reply...