Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • trfletch 595 posts 571 karma points
    Feb 23, 2009 @ 11:41
    trfletch
    0

    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

  • trfletch 595 posts 571 karma points
    Feb 24, 2009 @ 11:40
    trfletch
    0

    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.

  • Petr Snobelt 923 posts 1534 karma points
    Feb 24, 2009 @ 11:59
    Petr Snobelt
    0

    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

  • trfletch 595 posts 571 karma points
    Feb 24, 2009 @ 18:46
    trfletch
    0

    Thanks Petr,

    That works perfectly, I love this forum!

  • 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.

Please Sign in or register to post replies