1

I have a channel with entries in categories and subcategories. I want to output a list of only the entries that are not in the subcategories. Is there a way to do an "only A" or "A & not anything else" type of selection?

2

I'd look to use GWCode Categories. You have the same control over inclusions and exclusions but a whole load more on top. excl_cat_id and excl_cat_id_children could be useful here if the categories are relatively fixed and you know their IDs.

| improve this answer | |
1

Try Dandy Cat. it allow really crazy stuff on categories.

| improve this answer | |
0

You can use the

category=""

parameter.

You can exclude all child categories

category="not 2|14|16"

or specify all parent categories

category="1|3|4"

Check out the docs: http://ellislab.com/expressionengine/user-guide/modules/channel/channel_entries.html#category

| improve this answer | |
  • Thanks. I'm not sure if this works, though. Edit: sorry, hit enter. I tried dynamically building a list (a|b|c) of every category but the one to show, but in the docs it says "If you are using exclusion (category="not 3|4") and an entry is in a category that is not excluded, the entry will be returned even if it also belongs to an excluded category." Is there a way around that? – Michael May 22 '13 at 19:10
  • 1
    It means that when an entry has a parent AND a child category it will be displayed, even though the child category is excluded. Just make sure you turn off auto-assign parent categories (ellislab.com/expressionengine/user-guide/cp/admin/channels/…) and you should be fine. – okenathan May 22 '13 at 19:36
  • Turning off auto-assign seems to meet my needs nicely (assuming nobody else comes back and changes the categories.) – Michael May 23 '13 at 6:05

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.