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.

Category not doesn’t seem to work when using year =

May 04, 2012 8:14am

Subscribe [1]
  • #1 / May 04, 2012 8:14am

    Kubik101

    155 posts

    Using category not isn’t working on the following channel entries tag.
    I am using EE 2.4.0

    {exp:channel:entries channel="south-australia" dynamic="no" orderby="photo_year|photo_month|photo_day|photo_location|refine_order|writer" sort="desc|desc|desc|asc|asc|asc" limit="48" paginate="custom" disable="member_data" year="{segment_3}" category="not 79"}

     

  • #2 / May 04, 2012 5:37pm

    Shane Eckert

    7174 posts

    Hey Kubik101,

    Off the bat, if this cannot find 48 (limit=“48”) that meets these terms exactly then nothing is going to be return. So we need to simply this a bunch.

    Can you simplify this and add to it to see where it breaks?

    {exp:channel:entries channel="south-australia" category="not 79"}

    There is so much going here. It’s not technically wrong, but with all this going on, it’s hard to know what to even expect the result to be. Does that make sense?

    Start with the basics and build up.

    Cheers,

  • #3 / May 04, 2012 10:35pm

    Kubik101

    155 posts

    Hey Shane.

    It’s a gallery and there are plenty of not=79 items, so no worries there.

    I Simplified the tag as you suggested and I still get items from the category declared (not).

    Cheers.
    +)

  • #4 / May 07, 2012 3:31pm

    Shane Eckert

    7174 posts

    Hello Kubik101,

    That is really odd.

    Can you double check that the category ID does in fact match the category you are thinking it does?

    Please let me know,

  • #5 / May 07, 2012 9:58pm

    Kubik101

    155 posts

    YO!
    I doubled checked.
    Can you get it to work your end..?
    =)

  • #6 / May 10, 2012 4:02pm

    Shane Eckert

    7174 posts

    Hi Kubik101,

    Yes, this does work for me.

    Are you dealing with parent/children in the categories?

    Thank you,

  • #7 / May 11, 2012 6:07am

    Kubik101

    155 posts

    Yeah I just set up a test area and is working for me over there.
    I will look deeper into the one that’s playing up and let you know how I go.
    Thanks.
    +)

  • #8 / May 11, 2012 6:38am

    Kubik101

    155 posts

    I found the problem.
    I was excluding an entry from a single category.
    And that category had a parent category selected too since Auto-Assign Category Parents was set to yes.
    And on top of that the entry belonged to other categories, so therefore had no chance of disappearing.

    Now:
    Most of my entries are across multiple categories, hence me not noticing any removals after excluding a single category.
    The documentation confuses me a bit - http://ellislab.com/expressionengine/user-guide/modules/channel/channel_entries.html#category

    I pretty much want to declare one category to not show, and have all entries that are in that category, even though they may be in other categories, to not show up within a channel entries tag.

    I don’t want to have to keep tabs on new categories that may break the template and so and so on.

    Can this be done?

    =)

  • #9 / May 15, 2012 11:40am

    Shane Eckert

    7174 posts

    Hello Kubik101,

    Categories are fun! Not really.

    I have found that this Add-On to be a necessity. With it you can get child categories, or parent categories.

    What do you think? Can you give it a spin?

    Cheers,

  • #10 / May 15, 2012 11:43am

    Kubik101

    155 posts

    Yeh but we’re talking about excluding entries based on categories.
    Does GW Code Categories have that?

  • #11 / May 17, 2012 4:14pm

    Shane Eckert

    7174 posts

    Hello Kubik101,

    Gotcha, you are right. Got caught up in the Add-On.

    You will be shown all entries without those categories, by using the not parameter. This means you will need to keep track of the categories that you create.

    Does that make sense?

    Cheers,

  • #12 / May 23, 2012 9:12pm

    Kubik101

    155 posts

    Is there a better way?
    Is there a way using query?

    I would like to declare only one category and have no entries from that category coming through.

    I also interested to know if you can exclude entries based on custom fields too?

  • #13 / May 25, 2012 4:04pm

    Shane Eckert

    7174 posts

    Hey Kubik101,

    There may be a better way, I am going to push this over to the Community Help Forum for you.

    Enjoy your 3-day weekend!

    Cheers,

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

ExpressionEngine News!

#eecms, #events, #releases