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.

Is it possible to sort by two categories?

August 20, 2010 4:02pm

Subscribe [4]
  • #1 / Aug 20, 2010 4:02pm

    I’m using multiple categories for entries in one weblog. I’m using one Category group for a navigation menu for entries of this weblog.

    I also have a drop down menu for sorting by a different category group. It works, but when using the drop down it is pulling from all entries in the weblog, not just from the page/category I want to limit the sorting by.

    Essentially I want to sort by a first category and then sort that category by another category, leaving out entries that may share category 2 but are not in category 1.

    What’s the best way to accomplish this? Please let me know if I have done a poor job of describing what I want to achieve.

  • #2 / Aug 22, 2010 1:31pm

    Greg Salt

    3988 posts

    Hi gofreshdesign,

    Please see the documentation for the weblog category parameter which allows you to filter by multiple categories.

    Cheers

    Greg

  • #3 / Aug 22, 2010 7:00pm

    I’ve looked through that but I’m not sure how to accomplish what I’m trying to do.

    I want to have the entries sorted by a category id from category group A first, and then sort those results by a category id of category group B.

    I’m using a drop down menu. Maybe sharing the page would be helpful. (The horizontal menu is just a static image for now, only the vertical menu works.)

    http://jax4kids.com/index-ee.php/classes/category/acting/

    So while in the Acting section, I want to be able to further whittle down the entries by say, Age Group - Toddler. But what is happening now, is the drop down menu will show all entries marked Toddlers in the entire weblog, not just the Acting category.

  • #4 / Aug 23, 2010 8:41am

    Design by Front

    106 posts

    Hey gofreshdesign,

    It might be worth having a look at the Low Seg2Cat extension, which enables you to get useful pieces of information (such as category id) from the categories in your URL.

    Hope that helps,
    Chuck

  • #5 / Aug 23, 2010 9:27am

    Sue Crocker

    26054 posts

    Thanks for the assist, Chuck.

    gofreshdesign, does Chuck’s advice help?

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

ExpressionEngine News!

#eecms, #events, #releases