Show banner only for guest user

(Gregory G) #1

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

(Frederik) #2

It might be done based on the trustlevel…?

(cpradio) #3

With CSS.

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

(Gregory G) #4

Can you give me a code exemple ?

(cpradio) #5
body:not(.anon) #banner {

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

(Gregory G) #6

Thanks a lot :wink: :wink: