Public
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to hide a category from anonymous visitors; reveal the category when logged in?

I'd like to hide a category from anonymous visitors, but reveal the category when the visitor provides credentials or joins the community.

I believe this is possible by adding a "registered user" role, assigning the role to all members, and setting the default role's "See categories" permission to deny. However, this seems to be an overly complicated for what I believe should be a simple configuration.

Did I miss an embarrassingly obvious setting or configuration somewhere?

4 Replies 4

Someone smarter can explain a better way probably but you can wrap the component/content in code to only show it to registered users or vice versa I believe.

 

<#if user.anonymous>
</#if>
<#if !user.registered>
</#if>

 

Mentor

Can you tell me how to navigate to the category excluder @Kovacek

I am needing to do something similar. I have a category with a blog area underneath it. I would like to make it so this blog area is not accessible by users not logged in. But i would like the category page to be accessible. 

I figured it would be managed with permissions. Setting everything on default to the blog page as deny, then creating the role in that area called "approved user"... which is what we use for any user that has successfully logged into the community.

Is that correct? 

@StanGromer - thanks for the suggestion. Admittedly, coding is not in my wheelhouse and, while the code snippet looks easy enough, I had hoped for a simple permissions-based option.

@akloepfer - I believe Kovacek was likely referencing a different engagement platform in the (now deleted) proposed solution. There was mention of Wordpress in the reply, and I've not seen a "category excluder" setting in neither Studio or Admin. 

Lol, the deleted post was spam/bot and not a real person.  Don't ask me how I know that, I'm part robot.

In your case with no code solution, using roles would be your best bet unfortunately. Khoros doesn't have a simple way to do it just off authentication in their admin settings.

Welcome to the Technology board!

Curious about our platform? Looking to connect on social technology? You've come to the right place!

Are you a Khoros customer? For direct assistance from our Support team, please visit the Support Forum.