开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜