Skip to content

Better class attribute rendering #181

Description

@GeertDD

When setting the firstClass and/or lastClass options to null or an empty string, like this:

{{ knp_menu_render('AcmeDemoBundle:Builder:mainMenu', { 'firstClass': null, 'lastClass': null }) }}

A menu with the following class attributes is rendered:

<ul>
    <li class="current ">...</li>
    <li class="">...</li>
</ul>

Even though this is completely valid markup, it would be nice if the trailing space after the class current would be gone, as well as the empty class attributes:

<ul>
    <li class="current">...</li>
    <li>...</li>
</ul>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions