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.

Display Category

February 04, 2011 5:36pm

Subscribe [2]
  • #1 / Feb 04, 2011 5:36pm

    ABWE

    2 posts

    I have a simple online store where some of my products have multiple categories assigned to them.

    The problem I’m running into is I want my products to show separately based on the number of categories they belong to. For example I have two categories called “books” and “specials”. How do I display those items that only have the category of “books” assigned to them separately from those that have both “books” and “specials” assigned to them.

    Right now if I specify the category “books” both “books” and “specials” show up.

  • #2 / Feb 04, 2011 7:27pm

    e-man

    1816 posts

    Could you post your code here so we can have a look?  Normally if you only specify 1 category only entries with that category should show.

  • #3 / Feb 07, 2011 11:41am

    ABWE

    2 posts

    Here’s the code I’m using to display the products with a category of books (20):

    {exp:weblog:entries site="abwe" weblog="publications" category="20" disable="trackbacks|member_data" orderby="title" sort="asc"}

    And here’s the code I’m using to display books that also have a category of specials (20&242;):

    {exp:weblog:entries site="abwe" weblog="publications" category="20&242;" disable="trackbacks|member_data" orderby="title" sort="asc"}

    The second method works just fine at displaying only books on special, however the first method will show both as well.

  • #4 / Feb 08, 2011 12:20pm

    ABWE

    2 posts

    Any ideas? All I really want to do is include entries with a category value of “20” but not “20&242;”.

    I know this is not correct but something along this line,

    category="20 not 20&242;"
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases