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.

weblog entry in several categories - possible to limit the number shown?

March 21, 2010 12:11pm

Subscribe [1]
  • #1 / Mar 21, 2010 12:11pm

    Ross1988

    59 posts

    Hi

    I have a directory system set up using EE. It seems to work well, with the only exception that if an entry appears in two categories, It shows up twice when using

    {exp:weblog:entries weblog="{embed:listing_weblog}"  limit="1"}
    
    {categories}
    You are here: <b><a href="http://{blog_url}">{blog_title}</a></b> » <a href="http://{path={segment_1}/listings/}">{category_name}</a> » {title}
    {/categories}
    
    {/exp:weblog:entries}

    this code essentially creates a breadcrumb navigation, which works fine, except when an entry has two or more categories, rightly so, the “breadcrumb” is repeated X amount of times.

    this means that if a user is viewing Entry A on Category A, they see bread crumbs to Category A and Category B, so visually it’s annoying.

    is it possible to show categories dynamically in this manner - the URL contains the category of the entry it was access through if that makes sense.

    thanks

    [Mod Edit: Moved to the How to forum]

  • #2 / Mar 22, 2010 10:07am

    ender

    1644 posts

    I wrote up something to this effect back in June 09 over here.  I used PHP to get the functionality I needed.

  • #3 / Mar 22, 2010 4:21pm

    Ross1988

    59 posts

    i had a feeling it would need a bit of a hack due to the way the categories tag works but this looks promising.

    will take a look, thanks.

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

ExpressionEngine News!

#eecms, #events, #releases