This is a line, which I use for formatting my links:
%a.accordion-toggle.toggle-6{:href => "#"} #{name}
I would need to have an option to put in this class toggle-6 my own digit, for example toggle-1 etc.
How to do that in HAML syntax? I've tried something like
%a.accordion-toggle.toggle-#{id}{:href => "#collapseOne"} #{name}
But this returns
Illegal element: classes and ids must have values.
You can specify dynamic values as attributes:
%a{class: "accordion-toggle toggle-#{id}", href: "#collapseOne"} #{name}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With