Is there an easy way of interpreting PHP code within an HAML file?
Currently this is how I write a php file using Haml:
%ul#nav
%li
%a
<?php echo l('nav1'); ?>
Output:
<ul开发者_如何转开发 id="nav">
<li><a><?php echo l('nav1'); ?></a></li>
I which I could have something like this:
%ul#nav
%li
%a=$nav1
I checked pHaml and phpHaml but coudn't figure out how to use it, and I saw their last versions, and they are from 2007 (so it discouraged me even more).
Placing Php inside a Haml file is really that unpopular? Is there a new and easy way of doing it?
%ul#nav
%li
%a= $nav1
my reference: Reference
always check the right spacing
精彩评论