Copied to clipboard

Flag this post as spam?

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


  • Ian Penny 5 posts 25 karma points
    Oct 13, 2011 @ 15:49
    Ian Penny
    0

    Sub Navigation on Home Page Node

    I am using the Cogworks Flexnav package on a site under development.

    So far I have got Main Navigation and sub navigation working, but I am looking to have sub navigation pages from my home page, has anyone managed to do a site like this.

    Me being a total new guy to Umbraco I have no idea were to start.

  • Rich Green 2246 posts 4008 karma points
    Oct 13, 2011 @ 16:08
    Rich Green
    0

    Hi Ian,

    Welcome to the forum!

    I would suggest posting a screenshot of your content tree so we can see your site structure, then it might be easier to understand what you are trying to do.

    Cheers

    Rich

  • Ian Penny 5 posts 25 karma points
    Oct 13, 2011 @ 16:19
    Ian Penny
    0

    Hi Rich,

    Thanks for your speed response :)

    here are a couple of grabs, the first is the content tree of my site.

    Next is a grab of my site, showing where I would like the navigation to go.

    My site is pretty simple for now, I have a Homepage doctype and a contentpage doctype.  all items at the same level as news are contentpage.  so looking to split these items as sub pages if poss.

    Cheers :)

  • Rich Green 2246 posts 4008 karma points
    Oct 13, 2011 @ 16:31
    Rich Green
    0

    Hey Ian,

    The easiest way is to add an xslt file (and a new macro) with this code and replace 1090 with the node id of your 'news' node

    <ul>

    <xsl:for-each select="umbraco.library:GetXmlNodeById(1090)/* [@isDoc and string(umbracoNaviHide) != '1']">

    <li>

    <a href="{umbraco.library:NiceUrl(@id)}">

    <xsl:value-of select="@nodeName"/>

    </a>

    </li>

    </xsl:for-each>

    </ul>

    There are nicer ways of doing this (not relying on hard coding the id) but this should get you started.

    Rich

  • Rich Green 2246 posts 4008 karma points
    Oct 13, 2011 @ 16:34
    Rich Green
    0
    <ul>
    <xsl:for-each select="umbraco.library:GetXmlNodeById($source)/* [@isDoc and string(umbracoNaviHide) != '1']">
        <li>
            <a href="{umbraco.library:NiceUrl(@id)}">
                <xsl:value-of select="@nodeName"/>
            </a>
        </li>
    </xsl:for-each>
    </ul> 
  • Ian Penny 5 posts 25 karma points
    Oct 13, 2011 @ 16:35
    Ian Penny
    0

    Hi Rich,

    Have had to change task for now, but will give this a go a bit later on and give some feedback.

    Ian

  • Ian Penny 5 posts 25 karma points
    Oct 15, 2011 @ 00:04
    Ian Penny
    0

    Hi Rich,

    Can't seem to get that to return anything, so going to have a play over the weekend extending the main XSLT to include a bool value of isSubPage so that if isSubPage = true then page will not appear on main nav but will on subnav.

Please Sign in or register to post replies

Write your reply to:

Draft