Announcement

Collapse
No announcement yet.

Condition for 'Not Logged in'

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Condition for 'Not Logged in'

    I have made a logout button and hard coded it after the login button:
    Code:
    <actinic:block if="%3cactinic%3avariable%20name%3d%22AreRegCustomersAllowed%22%20%2f%3e">
    	<Actinic:NOTINB2B>
    	<actinic:variable name="NavigationIcon" value="Login Image Navigation Button" />
    	</Actinic:NOTINB2B><a href="<actinic:variable name="WebSiteURL" />/cgi-bin/bb000001.cgi?ACTION=LOGOUT" target="_self" onmouseover="SwapImage('nav_logout','button_logout_highlight.gif')" onmouseout="RestoreImage()"><img src="button_logout.gif" alt="Log Out" border="0" name="nav_logout" /></a>
    </actinic:block>
    Everything works but when not logged in both buttons are visible. When logged in only the Logout button is visible. What's the condition to use to make a Blockif to wrap around my logout code so that it does not show when you are not logged in?
    Thanks to all
    Jonathan Chappell
    Website Designer
    SellerDeck Website Designer
    Actinic to SellerDeck upgrades
    Graphicz Limited - www.graphicz.co.uk

    #2
    http://www.graphicz.eu.com/lol/
    Jonathan Chappell
    Website Designer
    SellerDeck Website Designer
    Actinic to SellerDeck upgrades
    Graphicz Limited - www.graphicz.co.uk

    Comment


      #3
      Try this :-)

      Code:
      <actinic:block if="%3cactinic%3avariable%20name%3d%22AreRegCustomersAllowed%22%20%2f%3e">
      	<Actinic:NOTINB2B>
      	<actinic:variable name="NavigationIcon" value="Login Image Navigation Button" />
      	</Actinic:NOTINB2B><Actinic:NOTINB2B><!--</Actinic:NOTINB2B><a href="<actinic:variable name="WebSiteURL" />/cgi-bin/bb000001.cgi?ACTION=LOGOUT" target="_self" onmouseover="SwapImage('nav_logout','button_logout_highlight.gif')" onmouseout="RestoreImage()"><img src="button_logout.gif" alt="Log Out" border="0" name="nav_logout" /></a><Actinic:NOTINB2B>--></Actinic:NOTINB2B>
      </actinic:block>

      Comment


        #4
        No good I am afraid. It stopped the logout button showing when logged in as well! What we want is the login button when you are logged out and the logout button when you are logged in.
        Thanks
        Jonathan Chappell
        Website Designer
        SellerDeck Website Designer
        Actinic to SellerDeck upgrades
        Graphicz Limited - www.graphicz.co.uk

        Comment


          #5
          Block Ifs are processed in Actinic, to create static code. They don't work 'online', they work offline.

          you won't find a blockif to do what you want.
          Tracey

          Comment


            #6
            Standard actinic themes do this, have a look at what they use and copy would be my first port of call. Select a business theme.

            Comment


              #7
              Here's the two conditions for login and logout:
              Code:
              <!-- When not logged in, this gives a login link -->
              <Actinic:NOTINB2B>
              <a href="http://www.mydomain.com/cgi-bin/bb000001.cgi?ACTION=LOGIN">login</a>
              </Actinic:NOTINB2B>
              
              <!-- When logged in, this gives the company name, username and a logout link -->
              <actinic:variable name="NowServing" />
              <actinic:variable name="CurrentAccount" />
              <actinic:variable name="LogoutSimple" />

              Comment


                #8
                It will not work if you have compact html checked in Design > Design Options

                Comment


                  #9
                  A complete triumph for Bentley Bloke, works perfectly.
                  Duncan, I may not have made myself clear, <actinic:variable name="LogoutSimple" /> and <actinic:variable name="Logout" /> both worked fine but produced a text link whereas I wanted an image link.
                  Thank you Bentley
                  Jonathan Chappell
                  Website Designer
                  SellerDeck Website Designer
                  Actinic to SellerDeck upgrades
                  Graphicz Limited - www.graphicz.co.uk

                  Comment

                  Working...
                  X