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.

Categories, Navigation and Woes.

April 28, 2008 7:32pm

Subscribe [1]
  • #1 / Apr 28, 2008 7:32pm

    James Mathias

    225 posts

    ‘ello!

    I’m first going to explain what I am trying to accomplish, then how I’m going about trying to accomplish and the problems I’m having getting it to work.

    My hope is that someone is willing and able to help me out of this no good situation that is delaying my production.

    What I am trying to accomplish;

    I have a weblog set up for services, it has three categories and is basically just a title and description for each service.

    Now, I want to put a “section” in the footer of this web-site that displays the last three entries in each category, organized by category, these links would be links to the specific service page, they correspond to.

    It would look like this;

    category name

    entry title link
    entry title link
    entry title link
    more…

    category name

    entry title link
    entry title link
    entry title link
    more…

    category name

    entry title link
    entry title link
    entry title link
    more…

    I hope that makes sense.

    Now the way I am currently doing this is with the exp:weblog:category_archive tag like so;

    {exp:weblog:category_archive weblog="services" style="linear" show="4"}
    
        {entry_titles}
            <li><a href="http://{path=template_group/template/index}" title="">{title}</a></li>
        {/entry_titles}
    
    {/exp:weblog:category_archive}

    This works, but it doesn’t allow me to limit the list of entries displayed to three, instead it shows all entries.

    I tried using a tip that involves using the exp:weblog:entries tag inside the exp:weblog:category_archive tag with a limit=“3”

    This works… Until I click the link and it takes me to the page and makes the other two links in the same list disappear, which defeats the purpose of listing the links for navigation purposes at all.

    So do you see my problem? Can you help?

    I would greatly appreciate any help at all, that accomplishes my original goal.

    Thanks for reading.

  • #2 / Apr 28, 2008 8:52pm

    James Mathias

    225 posts

    Solution found;

    Using the code as follows

    {exp:weblog:category_archive weblog="services" style="linear" show="6"}
                
        {categories} 
        {exp:weblog:entries weblog="services" orderby="date" category="6" sort="asc" limit="3" dynamic="off"}
    
            <li><a href="http://{title_permalink=" title="">{title}</a></li>
    
        {/exp:weblog:entries}
        {/categories} 
    
    {/exp:weblog:category_archive}

    Just adding dynamic=“off” to the exp:weblog:entries tag did the trick.

    Just wanted to note this in case someone else has the same problem, and now there is a specific answer.

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

ExpressionEngine News!

#eecms, #events, #releases