Skip to content

Menu Responsive Problem #902

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
hyyan opened this issue Jul 4, 2014 · 1 comment
Closed

Menu Responsive Problem #902

hyyan opened this issue Jul 4, 2014 · 1 comment

Comments

@hyyan
Copy link

hyyan commented Jul 4, 2014

Imagin I want to build a normal navbar like this one :

 {% embed '@MopaBootstrap/Navbar/navbar.html.twig'   with {staticTop: false, inverse: true }%}
         {% block brand %}
                <a class="navbar-brand" href="#">Brand</a>
         {% endblock %}

         {% block menu %}
               {{ mopa_bootstrap_menu('UserBundle:MainBuilder:build',{'automenu': 'navbar'}) }}
           {% endblock %}
 {% endembed %}

Now When I try to render a another menu in the same way using the embed method
in the same template like this :

 {% embed '@MopaBootstrap/Navbar/navbar.html.twig'   with {staticTop: false, inverse: true }%}
         {% block brand %}
                <a class="navbar-brand" href="#">Brand</a>
         {% endblock %}

         {% block menu %}
               {{ mopa_bootstrap_menu('UserBundle:MainBuilder2:build',{'automenu': 'navbar'}) }}
           {% endblock %}
 {% endembed %}

a problem will arise with the menu toggle button on responsive mode because the toggole button of both menus will have the same attribute data-target=="something"

I guess we should add new option so we can use it like this :

 {% embed '@MopaBootstrap/Navbar/navbar.html.twig'   with { inverse: true,data-target: "my choise" }%}
.....
@isometriks
Copy link
Collaborator

If you really need more than one nav bar on a page which I don't think is a common use case, you can just copy the contents of that template and just add it yourself. Or create your own template and then embed that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants