Copied to clipboard

Flag this post as spam?

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


  • vinod 2 posts 22 karma points
    Nov 28, 2013 @ 14:43
    vinod
    0

    Hide menu list base on Privileges

    Hi All, 

    I am trying to show few links base on user privileges parent and child li's, stuck at this code please help me, googled a lot nothing on these. these generic list items and user are from active directory and defined by numbers to show node name

    <xsl:variable name="visitors" select="2"/>
    <xsl:variable name="hr" select="3"/>
    <xsl:variable name="finance" select="6"/>
    <xsl:variable name="Admins" select="8"/>

    <ul class="nav-menu">
    <li class="first">
    <a href="/intranet-home.aspx" alt="Intranet-Home">Home</a>
    </li>
    <xsl:for-each select="$currentPage/ancestor-or-self::*[@isDoc and @level=$level]/* [@isDoc and string(umbracoNaviHide) != '1']">
    <li>
    <a href="{umbraco.library:NiceUrl(@id)}">
    <xsl:value-of select="@nodeName"/>
    </a>
    <xsl:if test="count(./child::*[@isDoc and string(umbracoNaviHide) != '1']) &gt; 0">
    <ul>
    <xsl:for-each select="./child::*[@isDoc and string(umbracoNaviHide) != '1']"> <xsl:choose>
    <xsl:when test="contains(umbraco.library:Session('priviliges'), $PM_Privilige)"> <xsl:if test="@nodeName='Updates'"> <li>
                 <a href="{umbraco.library:NiceUrl(@id)}">
                 <xsl:value-of select="@nodeName"/>
                </a>
               </li>
      </xsl:if>
    </xsl:when>
    <xsl:otherwise>
    <li>
                 <a href="{umbraco.library:NiceUrl(@id)}">
                   <xsl:value-of select="@nodeName"/>
                 </a>
               </li>
    </xsl:otherwise>
    </xsl:choose>
            </xsl:for-each>
    </ul>
    </xsl:if>
      </li>
    </xsl:for-each>
    </ul>

  • 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