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.

{exp:channel:category_heading} does not work when Use Category URL Titles In Links is set to Yes

January 26, 2011 6:56pm

Subscribe [6]
  • #1 / Jan 26, 2011 6:56pm

    maxbato

    42 posts

    See subject.

    Any ideas?

  • #2 / Jan 27, 2011 11:43am

    Sue Crocker

    26054 posts

    Hi, maxbato. Could you be more specific? Perhaps some sample code?

  • #3 / Jan 27, 2011 1:03pm

    maxbato

    42 posts

    Sure:

    {exp:channel:category_heading}
    
        <h1>{category_name}</h1>
        {if extended_description}
        {extended_description}
        {/if}
    {/exp:channel:category_heading}

    Only works when “Use Category URL Titles In Links?” is set to “No”.

    I have a feeling that when set to “Yes” the code that makes “This word will be used in the URL to indicate to the channel display engine that you are showing a category.” really does not do what it says.

    In my case, when set to “No” my URL is: “http://www.avagolighting.com/pages/products/C1” and the above code shows fine on the top of my page.

    When set to “Yes” the URL is “http://www.avagolighting.com/pages/products/category/aslb_series_light_bulbs” and I get no Category Name or extended description.

  • #4 / Jan 28, 2011 2:44am

    John Henry Donovan

    12339 posts

    maxbato,

    Are you nesting that tag pair in any other tags?
    Can you show some more of that template and what surrounds the category heading tags

    Can you confirm your version and build?
    Is it the same as in your signature?

    Are you using any third-party add-ons?

  • #5 / Jan 28, 2011 12:52pm

    maxbato

    42 posts

    Version 2.1.1
    Addons are Freeform and Wigwam.

    And even without the conditionals inside the cat_heading tags, it will not work with url_titles set to Yes.

    Here is the entire template:

    
    									
  • #6 / Jan 28, 2011 1:13pm

    Kurt Deutscher

    827 posts

    I don’t recall the exact reason now, but I’ve run into this one before and I believe the category heading function was dependent on the category_url_title being in a specific segment, or that there be a “C” number in the URL (meaning it wouldn’t work on single-entry pages) or something along those lines.

    We ended up coding a work-around for our sites. I’m going to follow this thread to see how its resolved.

  • #7 / Jan 29, 2011 4:02pm

    Greg Salt

    3988 posts

    Hi maxbato,

    As per the documentation for this tag you must specify the channel if you use the category name in URL feature. Please try adding a channel and then test this again.

    Cheers

    Greg

  • #8 / Feb 03, 2011 12:43am

    maxbato

    42 posts

    Thank you! I kept reading it over and over again and didn’t put two and two together with the requirement of the “channel name”

    All good now.

  • #9 / Feb 03, 2011 3:22pm

    Ingmar

    29245 posts

    Very glad to hear it. Please post again as needed.

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

ExpressionEngine News!

#eecms, #events, #releases