1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.2 So for registered user's, we can use this class .LoggedIn how about guest?

Discussion in 'Styling and Customization Questions' started by RoldanLT, Jan 16, 2014.

  1. RoldanLT

    RoldanLT Well-Known Member

    Is there any guest specific class that we can use?
     
  2. Manoj_Kumar

    Manoj_Kumar Guest

    Instead of CSS, You can wrap your code inside

    Code:
    <xen:if is="!{$visitor.user_id}">
    Guest content goes here
    </xen:if>
     
  3. RoldanLT

    RoldanLT Well-Known Member

    Will this one work's on EXTRA.css?
     
  4. RoldanLT

    RoldanLT Well-Known Member

    It didn't work on EXTRA.css
     
  5. Manoj_Kumar

    Manoj_Kumar Guest

    Yeah it won't work in stylesheet, instead try it on template files.
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    Just do it like this:
    Code:
    .myClass {
    <guests>
    }
    
    .LoggedIn .myClass {
    <logged in>
    }
     
    Manoj_Kumar and RoldanLT like this.
  7. RoldanLT

    RoldanLT Well-Known Member

    OK, this one works :)
    Code:
    .whatever { for guests; }
    .LoggedIn .whatever { for registered users; }
     

Share This Page