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.

Sorting by Categories

October 24, 2010 9:14am

Subscribe [3]
  • #1 / Oct 24, 2010 9:14am

    chealey

    95 posts

    I’m having a bit of a brain fart this morning and would appreciate some insight.

    I currently have have 5 categories and within each category i have 10 entries, so a total of 50 entries.

    I would like to list all 5 categories on a page and the entries beneath each one, for instance in this example the bold items are the categories and the italic are the items:

    Category 1
    Entry
    Entry
    Entry
    Entry
    Entry
    Category 2
    Entry
    Entry
    Entry
    Entry
    Entry
    Category 3
    Entry
    Entry
    Entry
    Entry
    Entry

    The way I’m currently doing it it’s doing this:
    Category 1
    Entry
    Category 1
    Entry
    Category 1
    Entry

    Category 2
    Entry
    Category 2
    Entry
    Category 2
    Entry


    Category 3
    Entry
    Category 3
    Entry
    Category 3
    Entry


    Would greatly appreciate any assistance you guys can provide.

    Cheers!

    [Mod Edit: Moved to the EE 2 Technical Support forum]

  • #2 / Oct 24, 2010 6:32pm

    Sue Crocker

    26054 posts

    Do you need anything more than a link to a title?

  • #3 / Oct 24, 2010 6:35pm

    chealey

    95 posts

    Yeah the “ENTRY” has the title, teaser, and some other custom fields.

  • #4 / Oct 25, 2010 9:26am

    chealey

    95 posts

    Anybody have any insight on this?


    Cheers!

  • #5 / Oct 25, 2010 10:53am

    Mark Bowen

    12637 posts

    Hiya,

    Take a look at the Channel Category Archive Tag. Pretty sure that should do what you’re after here.

    Hope that helps a bit.

    Best wishes,

    Mark

  • #6 / Oct 25, 2010 11:01am

    chealey

    95 posts

    Mark thanks for the reply, that tag to my understanding will only list the links to the entries rather than the entries themselves which is not what we’re going for.

    Correct me if i’m wrong though.

  • #7 / Oct 25, 2010 11:21am

    Mark Bowen

    12637 posts

    Oops sorry. Mis-read what you had posted above. I just saw all the Entry texts and my minds eye saw those as the titles. Sorry.

    Not sure if it could or more importantly should be done but perhaps you could use an embed to a template containing a channel entries tag to pull in the desired information using the entry_id_path perhaps?

    That or a SQL query I guess?

    Best wishes,

    Mark

  • #8 / Oct 25, 2010 7:47pm

    Sue Crocker

    26054 posts

    Thanks for the assist, Mark.

    chealey, a SQL query in an embed would probably be a slightly better choice. You’d have to know which fields to grab and display them correctly, but it’s doable.

    Does that help?

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

ExpressionEngine News!

#eecms, #events, #releases