Copied to clipboard

Flag this post as spam?

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


  • Henrik Hammarström 58 posts 54 karma points
    Sep 10, 2009 @ 06:14
    Henrik Hammarström
    0

    Public access login

    Hi there

    I follow this
    www.mortenbock.dk/...membership-in-umbraco-116.htm

     

    Ihave a content like this

    startpage

    --sub1

    --sub2

    --Loginpage(public access)

    -----sub1(public access)

    ----sub2

     

    Then I have some text on loginpage
    and some other text on the subpages that are under the loginpage

     

    when I click on sub1 whith public access i get redirectec to loginpage and see its content(I have loginpage both as loginpage and error page)
    The problem here is that it says "Welcome **** your logged in" but I get to loginpage


    but when i Click on sub 2 whitout  public access I get to that page

    heres my XSLT that I Call after Iam logged in

    ----------------------------------------

    <xsl:variable name="level" select="2"/>

    <xsl:template match="/">

    <!-- The fun starts here -->
    <ul>
    <xsl:for-each select="$currentPage/ancestor-or-self::node [@level=$level]/node [string(data [@alias='umbracoNaviHide']) != '1']">
    <xsl:value-of select="@path"/>
    <xsl:value-of select="@id"/>
    <br/>
     <xsl:if test="boolean(umbraco.library:HasAccess(@id, @path) = true()) = 'true'">



    <li>
            <a href="{umbraco.library:NiceUrl(@id)}">
                <xsl:if test="$currentPage/ancestor-or-self::node/@id = current()/@id">
                    <!-- we're under the item - you can do your own styling here -->
                    <xsl:attribute name="style">font-weight: bold;</xsl:attribute>
                </xsl:if>
                </a>
        </li>

      </xsl:if>
    </xsl:for-each>

     

    ---------------------------------------

    Can someone tell my why I see "Wrong" content when Im logging in ?
    Thanks

    /H

  • Ron Brouwer 273 posts 768 karma points
    Sep 10, 2009 @ 17:31
    Ron Brouwer
    0

    You can try:

    <xsl:for-each select="="$currentPage/ancestor-or-self::node [@level=$level]/node [string(data [@alias='umbracoNaviHide']) != '1'
                and (umbraco.library:IsProtected(@id, @path) = false()
                    or umbraco.library:HasAccess(@id, @path) = true())
                ]">

    Ron

Please Sign in or register to post replies

Write your reply to:

Draft