conditional php inside haml class name -
I am trying to keep a conditional statement in the name of the square for the name. I can do the regular html
& lt; A href = "/" class = linkHeader & lt; Php if ($ self) {echo 'active'; }? & Gt; & Lt; / A & gt; How do I do this in haml?
% a {: class => "LinkHeader",: href = & gt; "/"}
What are you using? MtHaml? Old (and broken) phapap?
I'm using it on MtHaml:
% a.linkHeader {class: $ self? 'Active': ''}
Comments
Post a Comment