ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Trying to show links based on member categories ids with multiple categories

November 20, 2012 1:31pm

Subscribe [1]
  • #1 / Nov 20, 2012 1:31pm

    cb_marketing

    1 posts

    Hello,

    I am using EE 2.53 with Zoo Visitor 1.3.16. I need to limit links based on the logged in Member Category ID, but some members are in multiple categories. This is the basic conditional that works if a member is only in one child category:

    {if "{exp:zoo_visitor:details}{categories backspace='1'}{category_id}&{/categories}{/exp:zoo_visitor:details}" == "3&40;&17;" OR "{exp:zoo_visitor:details}{categories backspace='1'}{category_id}&{/categories}{/exp:zoo_visitor:details}" == "4&40;&17;" OR logged_in_group_id == "1"}<a >{/if}

    The fist number is another category group (why two conditionals), the second number is the paret category of the third number. A member in multiple categories returns 3&40;&17;&20;&22;&30; causing the conditional to be false.

    Because there are 20 different template links. I either need to limit the zoo visitor response to just the child id (last number, 17) or be able to add an ‘OR’ category conditional like: 3&40;&17;&(20|22|23|24). Thought about limiting the zoo visitor to three but that would not work if the conditional is a category number past the first three.

    Any ideas on how to make this work? Is there a way to pluck out the categories not needed for the conditional?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases