How to check for main category
Posted: 07 Jul 2012, 17:15
Hi all,
I have it made so that when a user clicks on my 'photos' menu item, he or she will go directly to the page where subcategories or images of the main category are listed (because i don't want them to see the main category). My goal is to only have subcategories (and no images) in the main category, and only images in the subcategories.
Now, when a user (the author) logs in via the frontend, he or she can directly create a subfolder or upload an image. This can be done in the subcategories overview, and the photo's overview. However, when the user is in the subcategorie overview (inside the main category), i want him only to be able to create (or edit) subcategories, so no photo upload tab. But when the user is in the photo overview view (inside the subcategory), i want him only to be able to upload photo's (and no creating subcategories).
I found the code where the tabs are made, so i know how to hide them. I only need the condition: how can i find out if he's 'inside' the main category (subcategories overview view) or 'inside' a subcategory (photo overview view) ?
I have it made so that when a user clicks on my 'photos' menu item, he or she will go directly to the page where subcategories or images of the main category are listed (because i don't want them to see the main category). My goal is to only have subcategories (and no images) in the main category, and only images in the subcategories.
Now, when a user (the author) logs in via the frontend, he or she can directly create a subfolder or upload an image. This can be done in the subcategories overview, and the photo's overview. However, when the user is in the subcategorie overview (inside the main category), i want him only to be able to create (or edit) subcategories, so no photo upload tab. But when the user is in the photo overview view (inside the subcategory), i want him only to be able to upload photo's (and no creating subcategories).
I found the code where the tabs are made, so i know how to hide them. I only need the condition: how can i find out if he's 'inside' the main category (subcategories overview view) or 'inside' a subcategory (photo overview view) ?