It is the same syntax. The closing bracket, &#39;&gt;&#39; is optional if there is no inner text. The principle of hamlet is to make any redundant part of html optional, and to remove closing tags in favor of indentation. We are considering always using the closing bracket for examples to make It easier to digest for newcomers. It also makes for easier use of some html syntax highlighters (vim works well enough for me).<div>

<br><div class="gmail_quote">On Tue, Apr 12, 2011 at 4:04 PM, Michael Litchard <span dir="ltr">&lt;<a href="mailto:michael@schmong.org">michael@schmong.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

I&#39;m using yesod 0.7.3, and I&#39;m trying to change one of the yesod<br>
examples to match the structure created by the scaffolding utility.<br>
Here&#39;s the source of my confusion. This is what the sample hamlet file<br>
looks like generated from the scaffold utility<br>
<br>
!!!<br>
&lt;html<br>
    &lt;head<br>
        &lt;title&gt;#{pageTitle pc}<br>
        ^{pageHead pc}<br>
    &lt;body<br>
        $maybe msg &lt;- mmsg<br>
            &lt;div #message&gt;#{msg}<br>
        ^{pageBody pc}<br>
<br>
But here&#39;s a sample of the syntax used by yesod-examples 0.7.0.1<br>
<br>
&gt; instance Yesod Ajax where<br>
&gt;   approot _ = &quot;&quot;<br>
&gt;   defaultLayout widget = do<br>
&gt;   Ajax pages _ &lt;- getYesod<br>
&gt;   content &lt;- widgetToPageContent widget<br>
&gt;   hamletToRepHtml [$hamlet|<br>
&gt; \&lt;!DOCTYPE html&gt;<br>
&gt;<br>
&gt; &lt;html&gt;<br>
&gt;   &lt;head&gt;<br>
&gt;     &lt;title&gt;#{pageTitle content}<br>
&gt;     &lt;link rel=&quot;stylesheet&quot; href=&quot;@{StaticR style_css}&quot;&gt;<br>
&gt;     &lt;script src=&quot;<a href="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" target="_blank">http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js</a>&quot;&gt;<br>
&gt;     &lt;script src=&quot;@{StaticR script_js}&quot;&gt;<br>
&gt;     \^{pageHead content}<br>
&gt;   &lt;body&gt;<br>
&gt;     &lt;ul id=&quot;navbar&quot;&gt;<br>
&gt;       $forall page &lt;- pages<br>
&gt;         &lt;li&gt;<br>
&gt;           &lt;a href=&quot;@{PageR (pageSlug page)}&quot;&gt;#{pageName page}<br>
&gt;     &lt;div id=&quot;content&quot;&gt;<br>
&gt;       \^{pageBody content}<br>
&gt; |]<br>
<br>
This doesn&#39;t look like the same syntax to me. Am I right? How would I<br>
decouple the hamlet, as the scaffolding utility does?<br>
<br>
_______________________________________________<br>
web-devel mailing list<br>
<a href="mailto:web-devel@haskell.org">web-devel@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/web-devel" target="_blank">http://www.haskell.org/mailman/listinfo/web-devel</a><br>
</blockquote></div><br></div>