Webmastersite.net
Register Log In

hide category from everyone except admin

Comments on hide category from everyone except admin

hai
Forum Regular

Usergroup: Customer
Joined: Apr 03, 2007
Location: NY & PA

Total Topics: 94
Total Comments: 339
hai
Posted Sep 13, 2007 - 11:51 PM:

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
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Sep 14, 2007 - 12:07 AM:

Go to Admin > Settings > Categories

Show categories in list even when user doesn't have permission to view their content?

Select No


hai
Forum Regular

Usergroup: Customer
Joined: Apr 03, 2007
Location: NY & PA

Total Topics: 94
Total Comments: 339
hai
Posted Sep 14, 2007 - 12:15 AM:

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.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Sep 14, 2007 - 9:11 PM:

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.
hai
Forum Regular

Usergroup: Customer
Joined: Apr 03, 2007
Location: NY & PA

Total Topics: 94
Total Comments: 339
hai
Posted Sep 14, 2007 - 11:52 PM:

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.

Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Sep 16, 2007 - 2:57 AM:

If it's only for admins wouldn't you use <IF {THISMEMBERISADMIN}>?
hai
Forum Regular

Usergroup: Customer
Joined: Apr 03, 2007
Location: NY & PA

Total Topics: 94
Total Comments: 339
hai
Posted Sep 16, 2007 - 1:32 PM:

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!
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.