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.

displaying category titles with associated weblog titles

February 21, 2011 1:18pm

Subscribe [2]
  • #1 / Feb 21, 2011 1:18pm

    haweb

    2 posts

    Hi Guys,
    How do you output the weblog titles associated with different categories? I have tried the below but the outputted titles show ALL the weblog titles in the category group and not just the titles associated with their respective category
    eg:
    If I have the categories:
    AUDI
    BMW
    JAGUAR

    and the weblogs:
    Audi1
    Audi2
    Audi3
    BMW1
    BMW2
    JAGUAR1
    JAGUAR2
    JAGUAR3
    JAGUAR4
    ....I would like to output Category and associated weblog titles eg
    AUDI
    -Audi1
    -Audi2
    -Audi3
    BMW
    -BMW1
    -BMW2
    and so on

    I tried the below but it outputs:
    ##AUDI##
    Audi1
    Audi2
    Audi3
    BMW1
    BMW2
    JAQUAR1
    JAQUAR2
    JAQUAR3
    JAQUAR4
    ##BMW##
    Audi1
    Audi2
    Audi3
    BMW1
    BMW2
    JAQUAR1
    JAQUAR2
    JAQUAR3
    JAQUAR4
    i.e. all the weblogs under each category

    {exp:weblog:categories category_group="9" weblog="myweblog"}    
    
     <div class="msg_list">
            {category_name}
            <div class="msg_body">
                <ul>
    
    
     {exp:weblog:entries weblog="myweblog" }
      
                <li><a href="#">{title}</a></li>
         {/exp:weblog:entries}
                </ul>
            </div></div>
       
    
        {/exp:weblog:categories}

    Any ideas please?
    Thanks

  • #2 / Feb 22, 2011 3:29am

    John Henry Donovan

    12339 posts

    EEDude,

    Take a look at the category archive tag. Would that work for you?

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

ExpressionEngine News!

#eecms, #events, #releases