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.

One Entry + Title Summary + Categories

May 20, 2008 3:13pm

Subscribe [0]
  • #1 / May 20, 2008 3:13pm

    mountain monkey

    23 posts

    I would like my page to display one entry, followed by a list of linked titles from the same category. I have a list of categories on this page also, and when I choose a different category it lists the Titles from the default category as well as the newly chosen category. God I hope that’s not too cryptic…anyway, how do I set it up so that only related Titles are displayed??? Here’s what I have in my template;

    {exp:weblog:entries weblog="expect" orderby="title" sort="asc" limit="1" show_future_entries="yes"}
              {title}
    {body}
    {/exp:weblog:entries}
    
    {exp:weblog:entries orderby="date" sort="asc" weblog="expect" dynamic="off"} 
    <a href="http://{title_permalink=site/expect}">{title}</a>
    {/exp:weblog:entries} 
    
    {exp:weblog:categories weblog="expect" parent_only="yes"}
    <a href="http://{path=">{category_name}</a>
    {/exp:weblog:categories}

    Any help would be greatly appreciated! :0)
    Thanks,
    Linda

  • #2 / May 20, 2008 10:39pm

    Rob Allen

    3118 posts

    I would like my page to display one entry, followed by a list of linked titles from the same category. I have a list of categories on this page also, and when I choose a different category it lists the Titles from the default category as well as the newly chosen category. God I hope that’s not too cryptic…anyway, how do I set it up so that only related Titles are displayed??? Here’s what I have in my template;

    {exp:weblog:entries weblog="expect" orderby="title" sort="asc" limit="1" show_future_entries="yes"}
              {title}
    {body}
    {/exp:weblog:entries}
    
    {exp:weblog:entries orderby="date" sort="asc" weblog="expect" dynamic="off"} 
    <a href="http://{title_permalink=site/expect}">{title}</a>
    {/exp:weblog:entries} 
    
    {exp:weblog:categories weblog="expect" parent_only="yes"}
    <a href="http://{path=">{category_name}</a>
    {/exp:weblog:categories}

    Any help would be greatly appreciated! :0)
    Thanks,
    Linda

    Try this…

    For both you need to use the same orderby method. On the second weblog_entries tag add the offset parameter - this says “show all entries except the latest one”.

    {exp:weblog:entries weblog="expect" orderby="date" sort="asc" limit="1" show_future_entries="yes"}
    {title}
    {body}
    {/exp:weblog:entries}
    
    {exp:weblog:entries orderby="date" sort="asc" weblog="expect" offset="1"}
    <a href="http://{title_permalink=site/expect}">{title}</a>
    {/exp:weblog:entries}
    
    {exp:weblog:categories weblog="expect" parent_only="yes"}
    <a href="http://{path=">{category_name}</a>
    {/exp:weblog:categories}
  • #3 / May 21, 2008 6:41pm

    mountain monkey

    23 posts

    Thanks bluedreamer - this does work, except that the list of titles below my first entry also contains titles from the second category. I’d like only the Titles for this category to display, then when I click on the other category name, for an entry to display followed by a list of those Titles to show up on the page.

    Can’t seem to have my cake and eat it too!

    Linda

  • #4 / May 21, 2008 9:24pm

    Rob Allen

    3118 posts

    Are any of those titles listed in more than one category? Normally when viewing a page from a category URL you sould only see items in that specific category.

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

ExpressionEngine News!

#eecms, #events, #releases