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

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -