I have a category that I would like to have hidden from all guests and members, but still be viewable by the admin. I have edited the category and set "Can view category?" for Guests & Members to No and for Admin Yes. Unfortunately, the category, although not accessible without logging in is still listed in the site map and category drop-down list for guests.
If instead I change "Hide this category from listing?" to Yes it is not listed anywhere, not even for the admin. The only way I can access it is if I do a search for the category directly.
Is there anyway I can do what I want? Keep the category completely hidden from all guests and members yet still be available to admins?
The sitemap and category selector aren't usergroup-specific, categories are either shown or not in them. I'll look into it but I don't think there's a practical way to change that.
If there is no easy way for you to implement this I figured out a way around the problem that is good enough for me.
For anyone else who's interested this is what I did. I changed the "Hide this category" option to yes and then added the following code to my main.tpl -
<IF {THISMEMBERGROUPCANSUBMITCATEGORIES}> <p> <a href="{DIRURL}/index.php?action=displaycat&catid=175" class="categoryname">Category Name</a><br>Click to view shows from the private category.</p> </IF>
It's not perfect and may not work for everyone, but it does the job I need it to do.
Yes, you're correct. Didn't see that one. Copied the coding from another section of the page and got it to work so I left it at that. I will change it. Thanks for the correction!
0/5
1
2
3
4
5
This thread is closed, so you cannot post a reply.
Comments on hide category from everyone except admin
Forum Regular
Usergroup: Customer
Joined: Apr 03, 2007
Location: NY & PA
Total Topics: 94
Total Comments: 339
I have a category that I would like to have hidden from all guests and members, but still be viewable by the admin. I have edited the category and set "Can view category?" for Guests & Members to No and for Admin Yes. Unfortunately, the category, although not accessible without logging in is still listed in the site map and category drop-down list for guests.
If instead I change "Hide this category from listing?" to Yes it is not listed anywhere, not even for the admin. The only way I can access it is if I do a search for the category directly.
Is there anyway I can do what I want? Keep the category completely hidden from all guests and members yet still be available to admins?
Thanks for your help.
Marilyn
Expert
Usergroup: Customer
Joined: Aug 19, 2005
Location: England
Total Topics: 391
Total Comments: 1303
Go to Admin > Settings > Categories
Show categories in list even when user doesn't have permission to view their content?
Select No
Forum Regular
Usergroup: Customer
Joined: Apr 03, 2007
Location: NY & PA
Total Topics: 94
Total Comments: 339
Thansk for the quick response.
The setting was already set to no. Right now the category doesn't appear in the regular list, but shows up in the site map and drop-down list.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
The sitemap and category selector aren't usergroup-specific, categories are either shown or not in them. I'll look into it but I don't think there's a practical way to change that.
Forum Regular
Usergroup: Customer
Joined: Apr 03, 2007
Location: NY & PA
Total Topics: 94
Total Comments: 339
If there is no easy way for you to implement this I figured out a way around the problem that is good enough for me.
For anyone else who's interested this is what I did. I changed the "Hide this category" option to yes and then added the following code to my main.tpl -
<IF {THISMEMBERGROUPCANSUBMITCATEGORIES}>
<p>
<a href="{DIRURL}/index.php?action=displaycat&catid=175" class="categoryname">Category Name</a><br>Click to view shows from the private category.</p>
</IF>
It's not perfect and may not work for everyone, but it does the job I need it to do.
Thanks.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
If it's only for admins wouldn't you use <IF {THISMEMBERISADMIN}>?
Forum Regular
Usergroup: Customer
Joined: Apr 03, 2007
Location: NY & PA
Total Topics: 94
Total Comments: 339
Yes, you're correct. Didn't see that one. Copied the coding from another section of the page and got it to work so I left it at that. I will change it. Thanks for the correction!