Copied to clipboard

Flag this post as spam?

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


  • ivansager 15 posts 38 karma points
    Mar 17, 2009 @ 16:19
    ivansager
    0

    Menu Layout and Structures

    My goal is to create an infrastructure where I can define a DocType for Header Nav Tabs and then a DocType For Side Bar nav types. Example Below

    Top:
    About Us | News | Clients | Services | White Papers

    Side:
    About Us
    -Careers
    -Contact us

    Services
    -Development
    -Database Design
    -Project Management

    This way a content admin can create a new TopNav Doc type and it will automatically add to the topNav page as well create a new SideNav page and could add a new side nav under say About us as an example.

    I've tried to use XSLT

  • ivansager 15 posts 38 karma points
    Mar 21, 2009 @ 21:21
    ivansager
    0

    Using the ultimate Nav XSLT solved this issue

  • holyxing 1 post 20 karma points
    Mar 25, 2009 @ 10:35
    holyxing
    0

    Hi,guys


    would u give me a demo or source code which u resolved it?

    I am searching for the familly menu now,thanks by Holy

    [email protected]

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Mar 25, 2009 @ 11:33
    Dirk De Grave
    0

    Hi,

    mtt ultimate nav can be found at http://packages.maliciousthinktank.com/navdemo.aspx

    Regards,
    /Dirk

  • ivansager 15 posts 38 karma points
    Mar 25, 2009 @ 13:13
    ivansager
    0

    Dirk.

    As you can see I took your advice and went the XSLT route...a great choice.

    /Ivan

  • Q8Dev 4 posts 24 karma points
    Apr 01, 2011 @ 22:21
    Q8Dev
    0

    Dirk

    i install ultimateNav on umbraco 4.7 and my navigation not show, it show only <ul> tag

    and my site structure :

    Home

    -About us

    --Board Members

    --Executive Management

    -Invertor relations

    -subsidiaries

    -etc.

    -etc..

     

    please can you help me on that ?!

     

  • Q8Dev 4 posts 24 karma points
    Apr 01, 2011 @ 22:25
    Q8Dev
    0

    i mean it show like this :

     

    <div id="navBar">
              <ul class="mainNav">
              
     
               </ul>

    </div>

  • Daniel Bardi 927 posts 2562 karma points
    Apr 01, 2011 @ 22:38
    Daniel Bardi
    0

    Edit the default xslt to use your layout or wrap the nav macro in a div.

  • hetaurhet 245 posts 267 karma points
    Jun 04, 2011 @ 11:01
    hetaurhet
    0

    hey Q8De, did you find any solution? i also want to use this in umbraco version 4.7.0....

  • Q8Dev 4 posts 24 karma points
    Jun 04, 2011 @ 19:40
    Q8Dev
    0

    Hey,

    Finaly i forget that package (sorry), i wrote my own XSLT file, you can use it for (External,Enternal,Redirect,dropdown Menu) also it work with ProWorks_Redirect_Page_1.03

    Here is my code:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
    <xsl:stylesheet
    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxml="urn:schemas-microsoft-com:xslt"
    xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets"
    exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets ">
    <xsl:output method="xml" omit-xml-declaration="yes"/>
    <xsl:param name="currentPage"/>

    <!-- update this variable on how deep your site map should be -->

    <xsl:variable name="maxLevelForSitemap" select="3"/>
    <xsl:template match="/">
    <div id="nav">
    <ul>
    <li> <a href="/" target="_self">HOME</a></li>
    </ul>
    <xsl:call-template name="drawNodes">
    <xsl:with-param name="parent" select="$currentPage/ancestor-or-self::* [@isDoc and @level=1]"/>
    </xsl:call-template>
    </div>
    </xsl:template>
    <xsl:template name="drawNodes">
    <xsl:param name="parent"/>
    <xsl:if test="umbraco.library:IsProtected($parent/@id, $parent/@path) = 0 or (umbraco.library:IsProtected($parent/@id, $parent/@path) = 1 and umbraco.library:IsLoggedOn() = 1)">
    <ul>
    <xsl:for-each select="$parent/* [@isDoc and string(umbracoNaviHide) != '1' and @level &lt;= $maxLevelForSitemap]">
    <li>
    <xsl:choose>
    <xsl:when test="externalLink = 1">
    <a href="{link}" target="_blank">
    <xsl:if test="$currentPage/ancestor-or-self::*/@id = current()/@id">
    <xsl:attribute name="class">selected</xsl:attribute>
    </xsl:if>
    <xsl:value-of select="@nodeName"/>
    </a>
    </xsl:when>
    <xsl:otherwise>
    <a href="{umbraco.library:NiceUrl(@id)}">
    <xsl:if test="$currentPage/ancestor-or-self::*/@id = current()/@id">
    <xsl:attribute name="class">selected</xsl:attribute>
    </xsl:if>
    <xsl:value-of select="@nodeName"/>
    </a>
    </xsl:otherwise>
    </xsl:choose>

    <xsl:if test="count(./* [@isDoc and string(umbracoNaviHide) != '1' and @level &lt;= $maxLevelForSitemap]) &gt; 0">
    <xsl:call-template name="drawNodes">
    <xsl:with-param name="parent" select="."/>
    </xsl:call-template>
    </xsl:if>

    </li>
    </xsl:for-each>
    </ul>
    </xsl:if>
    </xsl:template>
    </xsl:stylesheet>


    Note : goto developer section and create new XSLT File with clean and Copy my Code and paste IF you didn't create "Document Types Or Pages" you will find error that's fine don't worry there is no mistake because XSLT file searche for the page. just check "Skip testing (ignore errors)"

    To get External And redirect Work perfect installah that package you will find it here : http://our.umbraco.org/projects/website-utilities/proworks-redirect-page

    after you install that package Goto Document Types in setting section and create new DocType for Ex: HomePage

    Go to Generic Properties and Add new Properties and follow that :

    =================================

    For Local Redirect Location:

    Name: whatever you want EX:  "Local Redirect"

    Alias: umbracoRedirect

    Type: Content Picker

    =================================

    For External Link:

    Name: whatever you want EX:  "URL Redirect"

    Alias: urlRedirect

    Type: Textstring

    =================================

    save and that's All

    i hope it's that what you looking for

     

    Regards

  • hetaurhet 245 posts 267 karma points
    Jun 16, 2011 @ 06:14
    hetaurhet
    0

    thanks Q8Dev.

    I also made by own xslt by modifying sitemap xslt. Created doc properties for both internal redirect and external url.

Please Sign in or register to post replies

Write your reply to:

Draft