Show banner only for guest user

Hi, how can i show a banner only for guest user, and hide it for logged user ?

It might be done based on the trustlevel…?

With CSS.

The body tag has an .anon class on it, you can target that.

4 Likes

Can you give me a code exemple ?

body:not(.anon) #banner {
  display:none;
}

If the user is logged in, they will not see the banner.

11 Likes

Thanks a lot :wink: :wink: