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.

weblog category="not 1" -- not working?!?

November 11, 2010 12:09pm

Subscribe [2]
  • #1 / Nov 11, 2010 12:09pm

    edward.willey

    23 posts

    Hi,

    I feel like i’m going a bit crazy as I can’t see any reason why this isn’t returning the required results…

    I’ve created a quick test page with the following code where i’m trying to exclude weblog entries with category id’s of 145 and 146:

    {exp:weblog:entries weblog="product" category="not 145|146"}
    {title} (<em>{categories}{category_name}, {/categories}</em>)
    
    {/exp:weblog:entries}

    You can see on the following link that everything is being returned including the entries I’m trying to exclude :(

    http://ngnew.nordicgames.se/index.php?/test

    category id 145 = bundle pack
    category id 146 = peripheral

    They’re both part of category_group id 8, so even if I try category_group=“not 8” it still doesn’t work?!?

    What am I missing?? :S

  • #2 / Nov 11, 2010 6:54pm

    Ingmar

    29245 posts

    What version and build of EE are you using? Any extensions? The entries you wish to exclude, are they assigned to id 145 / 146 exclusively, or some others in addition to that?

  • #3 / Nov 12, 2010 6:10am

    edward.willey

    23 posts

    Hi Ingmar,

    I’m on EE 1.6.9, I’m using various extensions across the site though none that deal with categories.

    As the link above shows, the entires are not exclusively set to the categories 145/146.

    thanks

    :: Ed

  • #4 / Nov 12, 2010 10:37am

    Ingmar

    29245 posts

    ... the entires are not exclusively set to the categories 145/146.

    I am afraid that’s probably the problem: your category parameter is read as “not 145” and “not 146”, but if these entries have other categories they will still match. Can you verify this by using an entry assigned to one of these categories only?

  • #5 / Nov 12, 2010 10:53am

    edward.willey

    23 posts

    Yeah I can verify that assigning a single category does exclude the record from the output.

    Just need to try and figure out a way round this now :S

    thanks

    :: ed

  • #6 / Nov 12, 2010 11:02am

    edward.willey

    23 posts

    Actually… I’ve got round it already…

    The weblog I’m using has 4 category groups assigned to it, but the items I’m trying to exclude will only ever use 3 of the groups, so by adding the parameter “category_group=‘not 1|3|8’” it’s filtered them out correctly 😊

  • #7 / Nov 12, 2010 11:05am

    Ingmar

    29245 posts

    Excellent 😊 Please post again in case there’s anything else.

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

ExpressionEngine News!

#eecms, #events, #releases