I’m having difficulty grasping the docs when it comes to categories. Is there a way to ONLY output the entries in a weblog that have NOT been assigned to a category?
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
August 11, 2011 5:44pm
Subscribe [2]#1 / Aug 11, 2011 5:44pm
I’m having difficulty grasping the docs when it comes to categories. Is there a way to ONLY output the entries in a weblog that have NOT been assigned to a category?
#2 / Aug 12, 2011 6:26am
hi municipal,
You need to use 2 parameters to do that. category_group= and uncategorized_entries=
You will need to add the category group ID(s)s to the category_group parameter that you do not wish to show.
{exp:channel:entries channel="about" category_group="not 1" uncategorized_entries="yes"}Let me know if that works for you
#3 / Aug 12, 2011 6:39am
Sorry—left out that I was trying to accomplish this dynamically and thus, without having to specify any weblog/category group. So it cannot be done??
#4 / Aug 12, 2011 6:49am
municipal,
You don’t need to specify the channel but you will need to use the other 2 parameters to do what you wish.
You could experiment with the categories tag pair also
{exp:channel:entries dynamic="no"}
{categories}
{if category_id == ''}
{title}
{body}
{/if}
{/categories}
{/exp:channel:entries}#5 / Aug 12, 2011 7:09am
I’m not sure I understand what your suggested code with the categories pair is supposed to do and how to use it? I mean, I tried and it doesn’t output anything.
#6 / Aug 15, 2011 4:03am
municipal,
My logic there isn’t going to work unfortunately.
The only way that can be accomplished is using my original method from the docs using the parameters