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:categories} placing ’nav_categories’ in generated ID and CLASS

August 16, 2010 3:27pm

Subscribe [3]
  • #1 / Aug 16, 2010 3:27pm

    carvingCode

    380 posts

    Checking my markup today, I noticed that EE2.1 build 20100810 is placing ‘nav_categories’ as default values in both the ID and CLASS selectors of the UL tag it generates.

    I was able to stop this by explicitly setting the ID and CLASS within the tag.  (Had to set the value to a space (’ ‘) to do this.)

  • #2 / Aug 16, 2010 3:59pm

    Ingmar

    29245 posts

    This is 2.1? Because you posted in the 1.0 forum. Let me know and I’ll just move it.

  • #3 / Aug 16, 2010 6:44pm

    carvingCode

    380 posts

    Yes, EE2.1 Sorry.

  • #4 / Aug 17, 2010 3:12am

    John Henry Donovan

    12339 posts

    carvingCode,

    I noticed that EE2.1 build 20100810 is placing ‘nav_categories’ as default values in both the ID and CLASS selectors of the UL tag it generates.

    This is correct. The default value for both is “nav_categories” and both can be overwritten using the class= and id= parameters

    What was your expected output?

  • #5 / Aug 17, 2010 9:38am

    carvingCode

    380 posts

    The problem with forcing a ID is the assumption {exp:channel:categories} will only be called once on a page.  I know it can be changed, but what is the benefit of EE supplying a default ID/CLASS here?

    In the example where I noticed this, I don’t need an ID or CLASS there, as I’m wrapping the listing in a DIV.  So, I am forced to supply a throwaway ID for valid markup.

  • #6 / Aug 17, 2010 11:31pm

    Brandon Jones

    5500 posts

    carvingCode,

    That makes sense, though I’m not sure this is a bug per se. I think a feature request to change this behavior would be most appropriate. Thanks for the feedback!

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

ExpressionEngine News!

#eecms, #events, #releases