Replies: 3 comments 1 reply
|
You can use a class attribute on linkTo with any value you choose. Any attribute outside those documented are rendered inline. Wheels has no idea what "active" means so you would need to implement the logic for the value yourself. I don't see a class attribute being relevant on urlFor though. |
|
Your right urlFor isn't relevant. For linkTo I thought about an option like "showWhenActive=1" would be handy. Right now I find myself creating a lot of if .... then "active" in the links which is fine but could be handled better imo. |
|
One way to tackle this is creating an application plugin where you can override the wheels linkTo function. You can implement your class logic then return the core.linkTo(). |
Uh oh!
There was an error while loading. Please reload this page.
Might be an idea to have the possibility to set an active link class in case the urlFor or linkTo is currently active?
All reactions