Copied to clipboard

Flag this post as spam?

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


  • Molly 94 posts 134 karma points
    Feb 05, 2013 @ 19:11
    Molly
    0

    XSLT Variable select not displaying Home node data type on uBlogsy levels beyond landing page

    Hi 

    I have an xslt file that selects a folder from media and displays it as a slideshow on everypage bar the homepage of the site i am building. This media folder is selected on the home section by the user, the slideshow displays fine on every page using :

     <xsl:variable name="slideImages" select="$currentPage/ancestor-or-self::*/Home/slideImages" />

    I have uBlogsy integrated into the site and the slideshow displays fine on the landing page of uBlogsy but if i click into the post the slideshow goes from url: 
    to:
    it's trying to access the media folder from the level above rather than going back to the root. I've tried various different variable selects with no success. 
    Any help would be appreciated. 
    Thanks 

  • Chriztian Steinmeier 2800 posts 8790 karma points MVP 8x admin c-trib
    Feb 12, 2013 @ 22:53
    Chriztian Steinmeier
    1

    Hi Molly,

    If I understand you correct, you should be able to just say:

    <xsl:variable name="slideImages" select="$currentPage/ancestor-or-self::Home/slideImages" />

    Which means to go up until a "Home" document type is found, and then take the slideImages off of that.

    (If this is not right, please post a screenshot or similar of the structure in uBlogsy, and I'll fix the XPath for you.)

    /Chriztian

  • Molly 94 posts 134 karma points
    Feb 13, 2013 @ 19:03
    Molly
    0

    Great that worked, before this i got it working using the home node specifically : 

    umbraco.library:GetXmlNodeById(1048)/slideImages

    But i prefer not to use the node id to do this.

    Thank you 

Please Sign in or register to post replies

Write your reply to:

Draft