If user logged in

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mr.Bennet
    New Member
    • Jun 2012
    • 29

    If user logged in

    Hey!

    I would like to add two divs. One for "If user logged in" & another "If user not logged in". How to code this?

    Best regards
  • borbole
    Senior Member
    • Feb 2010
    • 3074
    • 4.0.0

    #2
    Originally posted by Mr.Bennet
    Hey!

    I would like to add two divs. One for "If user logged in" & another "If user not logged in". How to code this?

    Best regards
    What version of vb are you using? If you are using vb4x you can use this conditional, assuming you want to add in in the templates.

    HTML Code:
    <vb:if condition="$show['guest']">
    <!-- code for the guests goes here -->
    <vb:else /> 
    <!-- code for logged in users goes here -->
    </vb:if>
    If you are using vb 3x simply remove the vb part from the conditional codes.

    Comment

    • Mr.Bennet
      New Member
      • Jun 2012
      • 29

      #3
      Thanks. Worked fine

      Comment

      • borbole
        Senior Member
        • Feb 2010
        • 3074
        • 4.0.0

        #4
        Originally posted by Mr.Bennet
        Thanks. Worked fine
        Glad to have been of help

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...