title: If statement with code on same block in haml, RoR
body: <p>I have this Haml view:</p>
  
  <pre><code>!!! strict
   %html{:xmlns =&gt; "http://www.w3.org/1999/xhtml"}
     %head
       %meta{:content =&gt; "text/html; charset=utf-8", "http-equiv" =&gt; "Content-Type"}
       %title
         Lighty | #{@page_title || "Home"}
     %body
       #popup Login here
       #fade
       #wrapper
         #container
           #header
             %a#logo{:href =&gt; "/"}
           #menu
             %ul#main
               %li#lighty
                 %a{:href =&gt; "/"} Lighty
                   %ul
                      %li
                         %a Link here
               %li#community
                 %a{:href =&gt; "/community"} Community
          #content
  </code></pre>
  
  <p>And I would like to add an if on line #16 to check if it is the currently visited page and add the class "active" to the <code>li</code> if it returns true.</p>
  
  <p>How do I write that if statement there and is there any easier way to do this?</p>
  
  <p>My plan now is to use a variable like <code>@current_page</code> and test if <code>@current_page == "community"</code> and add a class if it returns true.</p>
  
  <p>Am I thinking wrong? Is there any easier way to accomplish this?</p>