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 list of posts from a certain category only

September 18, 2008 3:20pm

Subscribe [2]
  • #1 / Sep 18, 2008 3:20pm

    davenport

    67 posts

    Hello,

    The site I am building has 6 consultation types. Each of those types has its own webpage explaining what that product entails. The website also has a Case Studies page,  with a list of past client consultations. The Case Studies weblog has a category for each of the 6 consultation types.

    I am trying to display all “relevant” case study entries in the sidebar of each of the consultation pages.

    Forgive me if this makes no sense, looking at the site will make this more clear:

    http://if.davenportdesign.net/index.php/process/discovery

    The links in the red bar are the category types. The “discovery” page is displaying ALL Case Study posts currently, I would like it to only display posts with the category “discovery”

    My current sidebar code:

    {exp:weblog:entries weblog="case_studies_page" dynamic="off" limit="3"  disable="pagination|trackbacks|member_data"}
    
    <div>
    <h4>{title}</h4>
    <p>{exp:imgsizer:size src="{client_logo}" width="40" alt="{title}" class="floatl"}<br />
                {exp:word_limit total="20"}{exp:html_strip}{client_body}{/exp:html_strip}{/exp:word_limit} <br />
                <a href="http://{homepage}/site/casestudies_single/{url_title}">more >></a><br />
            <br />
    </div><br />
    {/exp:weblog:entries}

    Thanks in advance for the help!

  • #2 / Sep 18, 2008 3:33pm

    Mark Bowen

    12637 posts

    Hi Travis,

    I could be wrong but I’m pretty sure you will probably want to look into the Related Categories Mode parameter for your weblog tag.

    Hopefully that should enable you to do what you need?

    Best wishes,

    Mark

  • #3 / Sep 18, 2008 4:35pm

    davenport

    67 posts

    Hey Mark, Thanks so much for the quick response.

    As is, my consultation pages are their own templates, each with their own separate weblogs (makes it easier for my client to manage their content). I could be wrong but I don’t think the Related_categories_mode tag will work in this context. Any advice on how to adapt my structure to accommodate related categories?

    If not, anybody know any alternative methods?

  • #4 / Sep 18, 2008 4:40pm

    Mark Bowen

    12637 posts

    Hiya,

    Well if you just want a weblog tag that has entries from one certain category then you would probably be looking at using the category=”“ parameter in your side-bar tag with dynamic=“off” too.

    That would probably do it for you?

    Best wishes,

    Mark

  • #5 / Sep 18, 2008 5:15pm

    davenport

    67 posts

    Brilliant!

    I had dismissed this method earlier after trying it using the category name as the value in the parameter. Browsing the docs reminded me such parameter uses ID numbers rather than the name itself. duh!

    Thanks so much for your help!

  • #6 / Sep 18, 2008 6:44pm

    Mark Bowen

    12637 posts

    No problem at all.

    Glad you’re set now.

    Hope it all goes well for you.

    Best wishes,

    Mark

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

ExpressionEngine News!

#eecms, #events, #releases