Copied to clipboard

Flag this post as spam?

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


  • Stephen Davidson 216 posts 392 karma points
    Oct 10, 2013 @ 23:17
    Stephen Davidson
    0

    Display node by alias no matter how deep.

    I have the following bit of XSLT to display my blog posts on the home page..

    <xsl:for-each select="$currentPage/umbBlog/umbBlogPost [@isDoc and string(umbracoNaviHide) != '1']">

    However the blog post is structured like the image below and the above code will only work if the blog post is in the root of the Blog folder. Anything in the date folders is being ignored...Is there a way to display any Blog post no matter how deep?

  • Chriztian Steinmeier 2800 posts 8790 karma points MVP 8x admin c-trib
    Oct 10, 2013 @ 23:21
    Chriztian Steinmeier
    102

    Hi Stephen,

    Yes there is - and it's only an extra character :-)

    Look for the double-slash, which is a shorthand for the descendant:: axis:

    <xsl:for-each select="$currentPage/umbBlog//umbBlogPost[@isDoc and not(umbracoNaviHide = 1)]">
    

    /Chriztian

  • Stephen Davidson 216 posts 392 karma points
    Oct 13, 2013 @ 20:34
    Stephen Davidson
    0

    Hey Chriztian,

    Sorry for the late reply...thanks  for helping out thats me sorted!

    Cheers,

    S

Please Sign in or register to post replies

Write your reply to:

Draft