0

I am having trouble showing a list of map categories that are not empty but they must work in conjunction with the countries category group

No children categories needed


My categories setup

  • Map group
    • Topographic
    • Geophysical
    • Geology

  • Countries group
    • Kenya
    • South Africa
    • Tanzania

Eg:

  • Entry one - Kenya & Geology
  • Entry two - Kenya & Geology
  • Entry three - Kenya & Geophysical

My result should be on this address

url: /maps/category/kenya

  • Geophysical
  • Geology

Any ideas, no luck with native categories and Gwcode categories tags. Any help is appreciated.

0

Leaving my solution here

I have used low2seg plugin and query. Little messy but it works.

{exp:query sql="select * from exp_categories as ec where ec.`cat_id` in (select distinct cat_id from `exp_category_posts` where entry_id in (select entry_id from `exp_category_posts` where cat_id = {segment_3_category_id})) and group_id = 1"} <option value="{cat_id}">{cat_name}</option> {/exp:query}


At the end of the query, ensure you choose selected cat_id and group_id

where cat_id = {segment_3_category_id})) and group_id = 1"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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