I am trying to write my first wordpress theme, and I am using haml
but I stumbled into a problem when I want to write statements such as the following, but in haml
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/reset.css" type="text/css">
I thought the haml
equivalent would simply use a :plain
tag for the php
but then I realised this would quickly turn very ugly, and it didn't much work.
So I am stuck with this:
%link{ :rel => "stylesheet", :href => "<?php bloginfo('stylesheet_directory'); ?>" }
Which, of course, is wrong.
I have had a look at phpHaml
and PhamlP
but I have no idea how to use them for my need of using a php
statement inside a :href
attribute in haml.
I am using CodeKit to recompile haml
into php
by simply changing the extension it compiles to from .html
to .php
and a lot of the documentation, to my understanding, requires I import their files in another .php
file to use their parsers.
Is there any way to achieve what I want to do?
Basically using php inline with haml, as easily as possible.