Add active class to link  using l() Seems so elementary but how does one get the active state onto the &lt;li&gt; of a link when manually using the l() function?

&lt;li&gt;&lt;?php print l('Hapiness','my/hapiness/complete', array('attributes' =&gt; array(), 'html' =&gt; FALSE)); ?&gt;&lt;/li&gt;


The above of course outputs the link in a list item with an active class on the link if the page is current, but how do I get that class onto the &lt;li&gt;?
You can't. The l() function is only responsible for rendering the HTML link, it has no concept of the tag it's being wrapped in (or indeed if it's even being wrapped in another tag at all).

The simple answer based on your question is to add it manually:

&lt;li class="active"&gt;&lt;?php print l('Hapiness','my/hapiness/complete', array('attributes' =&gt; array(), 'html' =&gt; FALSE)); ?&gt;&lt;/li&gt;