Displaying a block for anonymous users only

Is there a build in way in Litium to display a block only for anonymous users? If not - what other solutions is there? I’m thinking a target group that checks if a customer is signed in or not. Would that work?

Litium version: 8.12

My spontaneous thought was also to build a target group that checks it.

Another solution would possibly be to create a block container called “OnlyVisitors” and only render that container if you are not logged in… but target groups sounds better to me…

I did some testing with creating a target group but couldn’t figure it out. One problem might be that an “Anonymous target group” wouldn’t need a value for anything and it looks like it wouldn’t be possible to save a target group condition without a value.

I’m thinking that with the possibility to have nested blocks (blocks inside of another block), that came with Litium 8.9, the easiest solution would be to create an “Anonymous block” that just acts as a container for other blocks but only displays them if the user isn’t signed in. Haven’t tried it but it should be pretty easy to develop. At least in my head. :smiley:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.