1

Lets say I have The Parent Category which is GEORGE. George has 2 child categories Susie and Mike. If the user is on the website and is not logged in, they should only see Susie. If they are logged in they should see Mike and Susie. Problem.

GEORGE has to be selected to see Mike and Susie inside the same channel, how do we exclude Mike if the user is not logged in.

What I have tried.

{if member_group == "10"}
  {exp:channel:entries channel="products" dynamic="yes"}
    {if last_segment == "Mike" }
      {redirect="products"}
    {if:else}

Which works, but if im not logged in and are on Susies directory I see the product from Mike, I realize segmenting will not work for this particular issue. That the content needs to be filtered. Any suggestions.

3
  • You state categories, then show examples of entries. Which is it? We'd need to know the rules more to be able to advise better. When logged in you see all products from all children, but when not logged in, you only see products from the "directory" you're in...? You state last_segment - so can you give examples of URLs to support what you're trying to achieve (e.g. /george/susie...?) Sep 27, 2013 at 8:10
  • The entries go into categories, the specific entries I want to hide would have a segment of Mike, so for instance, if Logged_in you should be able to see mike and susie, if not logged_in, you should see susie only. I think i found the solution using parent_only. Going to try that to see if it works.
    – Cam
    Sep 27, 2013 at 15:41
  • @Cam, it's not clear how you are using the URL segments to call your categories. Can you show us which type of entries you expect to see per specific URL? Have you looked in Low Seg2Cat add-on? Oct 20, 2013 at 21:57

1 Answer 1

1

Cam, you've not provided a lot of detail, but, hopefully, this will help get you in the right direction. If you provide more info, we can guide you better.

{if logged_out}
  {exp:channel:entries channel="products" category="not 2"}
{/if}
{if logged_in}
  {exp:channel:entries channel="products"}
{/if}
1
  • I actually figured it out. Just didnt close out the conversation.
    – Cam
    Oct 21, 2013 at 15:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.