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.

Style exp:weblog:categories current category?

November 07, 2007 7:31pm

Subscribe [3]
  • #1 / Nov 07, 2007 7:31pm

    leeaston

    634 posts

    Is it possible to style the A tag for the selected category using the exp tag below?

    Cheers
    Lee

    {exp:weblog:categories weblog="{my_weblog}” style=“nested” }
    {category_name}
    {/exp:weblog:categories}

  • #2 / Nov 07, 2007 7:37pm

    Derek Jones

    7561 posts

    If you are using category url titles in your URLs, then you could use (as one example):

    {if category_url_title == segment_4}class="current"{/if}
  • #3 / Nov 07, 2007 7:40pm

    leeaston

    634 posts

    I love this place. Thanks for the help Derek.

  • #4 / Nov 08, 2007 11:19am

    PXLated

    1800 posts

    And of course there’s the DynoCat plugin? It automatically bolds the current category if that’s all you need.

  • #5 / Nov 08, 2007 5:34pm

    leeaston

    634 posts

    Thanks PXLated, I’ll take a look.

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

ExpressionEngine News!

#eecms, #events, #releases