Quantcast
Channel: Developer to developer
Viewing all articles
Browse latest Browse all 9076

Anonymous Visitor Group

$
0
0

Hello!

I am trying to implement a feature where a block is invisible if an authenticated user is viewing the site, and visible if it is being viewed by an anonymous visitor.

My first thought was to use visitor groups, because it allows the content author to toggle the view and know how it will look based on each state. However, I do not see that you can use logged in state to control a visitor group unless I am mistaken.

What is the preferred way to handle this use case? Currently I have wrapped my block in a check @if (!User.Identity.IsAuthenticated), but it is not ideal because the content author won't see it.

Thanks for any advice!


Viewing all articles
Browse latest Browse all 9076

Trending Articles