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.

{category} tag pair bug

May 08, 2009 5:28am

Subscribe [3]
  • #1 / May 08, 2009 5:28am

    shahW

    12 posts

    I think there might be a bug with {category} tag pairs. When I have the tag-pair as a single line, the last category retrieved is not closed properly

    /// as one single line of code
    {categories backspace="2"}<a href="http://{path=notes/archives}">{category_name}</a>, {/categories}

    Will generate the last closing </a> without the >

    <a href="http://url">category 1</a>, <a href="http://url">category 2</a>, <a href="http://url">category X</a
    __Where as if I were to close_
    /// as multi line of code_{categories backspace="2"}_    <a href="{path='notes/archives'}">{category_name}</a>, 
    {/categories}

    Will generate html code as intended

    <a href="http://url">category 1</a>, <a href="http://url">category 2</a>, <a href="http://url">category X</a>

    Or this tag-pair is intended to be used as per 2nd example?

  • #2 / May 08, 2009 5:40am

    silenz

    1651 posts

    Well, I think it’s working as intended.

    Example 1:
    Backspace removes the last 2 characters: , and >

    Example 2:
    Backspace removes the last 2 characters:  newline and ,

    So in Example 1 backspace=“1” would be sufficient.

  • #3 / May 08, 2009 5:43am

    shahW

    12 posts

    Ok, I got it. Thanks!

  • #4 / May 08, 2009 10:42am

    Ingmar

    29245 posts

    Thanks for stepping in, silenz 😊 If you need further help, simply start a new thread, please.

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

ExpressionEngine News!

#eecms, #events, #releases