Filter if page title is the same as a dropdown selection
Hi,
I currently have a dropdown datatype called "articletype" that is manually populated with values as follows:
Editorials
Columnists
Way In
Features
I also have pages with the same names as above created from the same document type and masterpage. Basically what I want to happen is when some clicks on one the pages listed above then I want them to see any pages that have that article type selected in the dropdown menu. So far I can get it so that all the pages above show pages with the articletype of Editorial with the following code:
But what I need is to change the vaule of "Editorials" to something so that it only displays the correct articles for what page you are on. I tried changing it to @nodeName but that then doesn't display anything. Can anybody offer any advice? Let me know if you need me to explain further. Many thanks Tony
I take it no-one so far knows what can be done about this? Or is it that I haven't explained what I need properly? If so let me know and I will try and explain further.
Filter if page title is the same as a dropdown selection
Hi,
I currently have a dropdown datatype called "articletype" that is manually populated with values as follows:
Editorials
Columnists
Way In
Features
I also have pages with the same names as above created from the same document type and masterpage. Basically what I want to happen is when some clicks on one the pages listed above then I want them to see any pages that have that article type selected in the dropdown menu. So far I can get it so that all the pages above show pages with the articletype of Editorial with the following code:
But what I need is to change the vaule of "Editorials" to something so that it only displays the correct articles for what page you are on. I tried changing it to @nodeName but that then doesn't display anything. Can anybody offer any advice? Let me know if you need me to explain further. Many thanks Tony
I take it no-one so far knows what can be done about this? Or is it that I haven't explained what I need properly? If so let me know and I will try and explain further.
I'm not sure, maybe you are looking for something like this:
select="umbraco.library:GetXmlAll()/descendant-or-self::node [@nodeTypeAlias='article'
and string(data[@alias='umbracoNaviHide'] != '1')
and data[@alias='articletype'] = $currentPage/@nodeName]">
...
Is better do check in for-each loop, because of performance ...
If it doesn't work try check whai is in @nodeName using xsl:value-of
Petr
Thanks Petr,
That works perfectly, I love this forum!
is working on a reply...