We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

List entries attributed to category parent or category children *only*

Development and Programming

Paul_B's avatar
Paul_B
86 posts
14 years ago
Paul_B's avatar Paul_B

Hi - I posted something about this in the Tech Support forum but I think that’s the wrong place for it. I’m working on something that has two-level categories (parent & child) and depending on the page, I want to display either entries related to parent-level only or child-level only, but not both together.

The categories look something like this:

Scotland Northern Ireland Wales England - London - South West … etc

So on one page I want to list entries attributed to Scotland, NI, Wales, England only (not any of the sub-regions) and on another page I just want to list entries categorised as sub-region only. I’ve tried lots of different ways of doing this with standard tags but am coming to the conclusion that I might need to use the query module to do this - am I wrong? (I hope so because I’m useless at writing sql queries!) Is there a way of handling this with the channel:entries and categories tag and an embed (bearing in mind that an entry tagged as ‘South West’ would also ca categorised as ‘England’)?

I don’t think this should be that complicated… is it?

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.