Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Menu view helper: Can't set class on li and a elements #76

Open
svycka opened this issue Jun 19, 2018 · 6 comments
Open

Menu view helper: Can't set class on li and a elements #76

svycka opened this issue Jun 19, 2018 · 6 comments
Milestone

Comments

@svycka
Copy link
Contributor

svycka commented Jun 19, 2018

when working with bootsrap4 it is not enough to set class on ul element. Maybe add methods like setULClass for li and a?

@froschdesign froschdesign changed the title Can't set class on li and a elements Menu view helper: Can't set class on li and a elements Jun 20, 2018
@froschdesign
Copy link
Member

You can add the classes to the li element instead of the a element or you can use a partial script. The last option should help you.

At the moment we will not add more methods to the view helper, because we will rework and simplify the whole rendering of the helpers.

@svycka
Copy link
Contributor Author

svycka commented Jun 20, 2018

@froschdesign yes I could but look https://getbootstrap.com/docs/4.0/components/navbar/#supported-content

<ul class="navbar-nav mr-auto">
      <li class="nav-item active">
        <a class="nav-link" href="#">Home</a>

all ul, li and a has to have a custom class and if I change from a to li this still not help.
And yes I can use a partial script(that's what I do now), but that's annoying because I have to manage active page acl and everything myself I haven't tested yet other helpers but they may have problems as well

@svycka
Copy link
Contributor Author

svycka commented Jun 20, 2018

@froschdesign when this could happen I guess not any time soon?

@froschdesign
Copy link
Member

@svycka
I know the Bootstrap "Navbar" and all the classes.

…I haven't tested yet other helpers but they may have problems as well

Please keep in mind zend-navigation was developed and released before Bootstrap or Foundation had a first release.

…but that's annoying because I have to manage active page acl…

It's very simple.

when this could happen I guess not any time soon?

Why are you so pessimistic? We are already working on it! (zend-expressive support first, then the rework of the view helpers)
In the meantime, I would extend the view helper, then you do not need a partial script.

@svycka
Copy link
Contributor Author

svycka commented Jun 20, 2018

I am not pessimistic just know that zend-* has a lot of projects and only a few people to work on them.

@weierophinney
Copy link
Member

This repository has been closed and moved to laminas/laminas-navigation; a new issue has been opened at laminas/laminas-navigation#1.

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

No branches or pull requests

3 participants