Questions tagged [hamlet]

Hamlet is a type-safe framework for generating HTML code from Haskell

Hamlet is a type-safe tool for generating HTML code in Haskell. It is used in the Yesod web framework .

86 questions
1
vote
1 answer

need to render several html snippets in different places inside a hamlet template

in my default-layout.hamlet: !!! #{pageTitle pc} ^{pageHead pc} <body> <div id="main"> <div id="header"> ???? <div id="content"> ^{pageBody…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/yesod" class="post-tag grid--cell" title="show questions tagged 'yesod'" rel="tag">yesod</a> <a href="../../questions/tagged/hamlet" class="post-tag grid--cell" title="show questions tagged 'hamlet'" rel="tag">hamlet</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Sep 07 '11 at 16:28">asked Sep 07 '11 at 16:28</time> <a href="../../users/410102/akonsu" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/410102.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="akonsu" /> </a> <div class="s-user-card--info"> <a href="../../users/410102/akonsu" class="s-user-card--link">akonsu</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">28,824</li> <li class="s-award-bling s-award-bling__gold" title="33 gold badges">33</li> <li class="s-award-bling s-award-bling__silver" title="119 silver badges">119</li> <li class="s-award-bling s-award-bling__bronze" title="194 bronze badges">194</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-65055815"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>1</strong></span> <div class="viewcount">vote</div> </div> </div> <div class="status answered-accepted"> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/65055815/hamlet-html-not-registering-head-or-title-tags-correctly-for-my-home-route-han" class="question-hyperlink">Hamlet html not registering <head> or <title> tags correctly for my home route handler</a></h3> <div class="excerpt">For some reason the <head> tag for the home of my website is not being processed the way I would like. Here is the source code of my site that I get from firefox. Please note that the first head and title tags are…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/haskell" class="post-tag grid--cell" title="show questions tagged 'haskell'" rel="tag">haskell</a> <a href="../../questions/tagged/yesod" class="post-tag grid--cell" title="show questions tagged 'yesod'" rel="tag">yesod</a> <a href="../../questions/tagged/hamlet" class="post-tag grid--cell" title="show questions tagged 'hamlet'" rel="tag">hamlet</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Nov 29 '20 at 00:28">asked Nov 29 '20 at 00:28</time> <a href="../../users/13603478/nicholas-hubbard" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/13603478.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Nicholas Hubbard" /> </a> <div class="s-user-card--info"> <a href="../../users/13603478/nicholas-hubbard" class="s-user-card--link">Nicholas Hubbard</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">527</li> <li class="s-award-bling s-award-bling__silver" title="2 silver badges">2</li> <li class="s-award-bling s-award-bling__bronze" title="15 bronze badges">15</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-58355674"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>1</strong></span> <div class="viewcount">vote</div> </div> </div> <div class="status answered-accepted"> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/58355674/yesod-hamlet-breaks-html-by-replacing-single-quotes-with-double-quotes" class="question-hyperlink">Yesod Hamlet breaks HTML by replacing single quotes with double quotes</a></h3> <div class="excerpt">I have some HTML code that I'm using in Hamlet: <div .modal-card .card data-options='{"valueNames": ["name"]}' data-toggle="lists"> Notice that the single quotes for data-options allows the use of double quotes inside the string. The problem is…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/yesod" class="post-tag grid--cell" title="show questions tagged 'yesod'" rel="tag">yesod</a> <a href="../../questions/tagged/hamlet" class="post-tag grid--cell" title="show questions tagged 'hamlet'" rel="tag">hamlet</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Oct 12 '19 at 15:31">asked Oct 12 '19 at 15:31</time> <a href="../../users/12147490/bg2000-reinstate-monica" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/12147490.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="bg2000 Reinstate Monica" /> </a> <div class="s-user-card--info"> <a href="../../users/12147490/bg2000-reinstate-monica" class="s-user-card--link">bg2000 Reinstate Monica</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">165</li> <li class="s-award-bling s-award-bling__bronze" title="8 bronze badges">8</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-50944126"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>1</strong></span> <div class="viewcount">vote</div> </div> </div> <div class="status answered-accepted"> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/50944126/how-to-get-related-fields-foreign-key-in-yesod" class="question-hyperlink">How to get related fields (foreign key) in Yesod?</a></h3> <div class="excerpt">I've defined the following models in Yesod application: CvCategory title Text order Int UniqueCvCategory title CvItem category CvCategoryId title Text fromYear Int toYear Int Maybe description Text Maybe …</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/sql" class="post-tag grid--cell" title="show questions tagged 'sql'" rel="tag">sql</a> <a href="../../questions/tagged/haskell" class="post-tag grid--cell" title="show questions tagged 'haskell'" rel="tag">haskell</a> <a href="../../questions/tagged/yesod" class="post-tag grid--cell" title="show questions tagged 'yesod'" rel="tag">yesod</a> <a href="../../questions/tagged/persistent" class="post-tag grid--cell" title="show questions tagged 'persistent'" rel="tag">persistent</a> <a href="../../questions/tagged/hamlet" class="post-tag grid--cell" title="show questions tagged 'hamlet'" rel="tag">hamlet</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Jun 20 '18 at 08:54">asked Jun 20 '18 at 08:54</time> <a href="../../users/1936416/ben" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/1936416.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Ben" /> </a> <div class="s-user-card--info"> <a href="../../users/1936416/ben" class="s-user-card--link">Ben</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">1,561</li> <li class="s-award-bling s-award-bling__gold" title="4 gold badges">4</li> <li class="s-award-bling s-award-bling__silver" title="21 silver badges">21</li> <li class="s-award-bling s-award-bling__bronze" title="33 bronze badges">33</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-46222578"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>1</strong></span> <div class="viewcount">vote</div> </div> </div> <div class="status answered-accepted"> <strong>2</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/46222578/route-interpolation-fails-with-type-error-in-yesod-handler" class="question-hyperlink">Route Interpolation fails with type error in Yesod Handler</a></h3> <div class="excerpt">I have a simple Yesod handler that renders a single Html tag like so: getHomeR :: Yesod site => HandlerT site IO Html getHomeR = defaultLayout [whamlet|$newline never <h1>Hello! |] I would like to print the route, and change the code to use the…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/haskell" class="post-tag grid--cell" title="show questions tagged 'haskell'" rel="tag">haskell</a> <a href="../../questions/tagged/routes" class="post-tag grid--cell" title="show questions tagged 'routes'" rel="tag">routes</a> <a href="../../questions/tagged/yesod" class="post-tag grid--cell" title="show questions tagged 'yesod'" rel="tag">yesod</a> <a href="../../questions/tagged/hamlet" class="post-tag grid--cell" title="show questions tagged 'hamlet'" rel="tag">hamlet</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Sep 14 '17 at 15:06">asked Sep 14 '17 at 15:06</time> <a href="../../users/781421/charlie" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/781421.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Charlie" /> </a> <div class="s-user-card--info"> <a href="../../users/781421/charlie" class="s-user-card--link">Charlie</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">705</li> <li class="s-award-bling s-award-bling__gold" title="1 gold badge">1</li> <li class="s-award-bling s-award-bling__silver" title="5 silver badge">5</li> <li class="s-award-bling s-award-bling__bronze" title="14 bronze badge">14</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-40823443"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>1</strong></span> <div class="viewcount">vote</div> </div> </div> <div class="status answered-accepted"> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/40823443/can-i-use-template-haskell-to-generate-hamlet-code" class="question-hyperlink">Can I Use Template Haskell to Generate Hamlet Code?</a></h3> <div class="excerpt">I have come across an interesting problem that I thought might be a pertinent place for Template Haskell. I'm working on a web front-end to a database using yesod and yesod-persistant. I am generating my database types using mkPerist function and…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/database" class="post-tag grid--cell" title="show questions tagged 'database'" rel="tag">database</a> <a href="../../questions/tagged/haskell" class="post-tag grid--cell" title="show questions tagged 'haskell'" rel="tag">haskell</a> <a href="../../questions/tagged/yesod" class="post-tag grid--cell" title="show questions tagged 'yesod'" rel="tag">yesod</a> <a href="../../questions/tagged/template-haskell" class="post-tag grid--cell" title="show questions tagged 'template-haskell'" rel="tag">template-haskell</a> <a href="../../questions/tagged/hamlet" class="post-tag grid--cell" title="show questions tagged 'hamlet'" rel="tag">hamlet</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Nov 26 '16 at 21:40">asked Nov 26 '16 at 21:40</time> <a href="../../users/2395870/brooks" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/2395870.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Brooks" /> </a> <div class="s-user-card--info"> <a href="../../users/2395870/brooks" class="s-user-card--link">Brooks</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">359</li> <li class="s-award-bling s-award-bling__silver" title="3 silver badges">3</li> <li class="s-award-bling s-award-bling__bronze" title="9 bronze badges">9</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-35888227"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>1</strong></span> <div class="viewcount">vote</div> </div> </div> <div class="status "> <strong>0</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/35888227/how-to-bind-haskell-pandoc-function-to-html-selector-with-yesodweb" class="question-hyperlink">How to bind Haskell Pandoc function to html selector with YesodWeb?</a></h3> <div class="excerpt">My usecase is the followin: I have got a website setup with YesodWeb I can write Text to one area Pandoc transforms my text, and i receive a converted text in another textbox The question: How can i bind my command to a html selector? i need to be…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/javascript" class="post-tag grid--cell" title="show questions tagged 'javascript'" rel="tag">javascript</a> <a href="../../questions/tagged/html" class="post-tag grid--cell" title="show questions tagged 'html'" rel="tag">html</a> <a href="../../questions/tagged/haskell" class="post-tag grid--cell" title="show questions tagged 'haskell'" rel="tag">haskell</a> <a href="../../questions/tagged/yesod" class="post-tag grid--cell" title="show questions tagged 'yesod'" rel="tag">yesod</a> <a href="../../questions/tagged/hamlet" class="post-tag grid--cell" title="show questions tagged 'hamlet'" rel="tag">hamlet</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Mar 09 '16 at 09:55">asked Mar 09 '16 at 09:55</time> <a href="../../users/4874369/divide-by-zero" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/4874369.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Divide by Zero" /> </a> <div class="s-user-card--info"> <a href="../../users/4874369/divide-by-zero" class="s-user-card--link">Divide by Zero</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">1,343</li> <li class="s-award-bling s-award-bling__gold" title="1 gold badge">1</li> <li class="s-award-bling s-award-bling__silver" title="14 silver badge">14</li> <li class="s-award-bling s-award-bling__bronze" title="37 bronze badge">37</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-35382639"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>1</strong></span> <div class="viewcount">vote</div> </div> </div> <div class="status answered-accepted"> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/35382639/having-trouble-compiling-yesod-route-after-introducing-a-parameter" class="question-hyperlink">Having trouble compiling yesod route after introducing a parameter</a></h3> <div class="excerpt">I am running a modified example of http://www.yesodweb.com/book/blog-example-advanced that previously did not use a parameter id of type DBEntitySchemaId. Since introducing it, I am getting Handler/Entity.hs:146:34: Couldn't match type…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/haskell" class="post-tag grid--cell" title="show questions tagged 'haskell'" rel="tag">haskell</a> <a href="../../questions/tagged/yesod" class="post-tag grid--cell" title="show questions tagged 'yesod'" rel="tag">yesod</a> <a href="../../questions/tagged/hamlet" class="post-tag grid--cell" title="show questions tagged 'hamlet'" rel="tag">hamlet</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Feb 13 '16 at 16:57">asked Feb 13 '16 at 16:57</time> <a href="../../users/2635503/markus-barthlen" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/2635503.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Markus Barthlen" /> </a> <div class="s-user-card--info"> <a href="../../users/2635503/markus-barthlen" class="s-user-card--link">Markus Barthlen</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">389</li> <li class="s-award-bling s-award-bling__silver" title="4 silver badges">4</li> <li class="s-award-bling s-award-bling__bronze" title="15 bronze badges">15</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-33462821"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>1</strong></span> <div class="viewcount">vote</div> </div> </div> <div class="status answered-accepted"> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/33462821/yesod-accessing-a-persistent-entity-id-from-hamlet" class="question-hyperlink">Yesod accessing a persistent entity id from hamlet</a></h3> <div class="excerpt">I currently have persistent pulling a list of products from a database and displaying them on the screen. I would like to use the Id from the database to store some information about these products in a cookie and to link to more detailed…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/haskell" class="post-tag grid--cell" title="show questions tagged 'haskell'" rel="tag">haskell</a> <a href="../../questions/tagged/yesod" class="post-tag grid--cell" title="show questions tagged 'yesod'" rel="tag">yesod</a> <a href="../../questions/tagged/hamlet" class="post-tag grid--cell" title="show questions tagged 'hamlet'" rel="tag">hamlet</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Nov 01 '15 at 13:48">asked Nov 01 '15 at 13:48</time> <a href="../../users/1557590/stewart-webb" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/1557590.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Stewart Webb" /> </a> <div class="s-user-card--info"> <a href="../../users/1557590/stewart-webb" class="s-user-card--link">Stewart Webb</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">189</li> <li class="s-award-bling s-award-bling__silver" title="2 silver badges">2</li> <li class="s-award-bling s-award-bling__bronze" title="14 bronze badges">14</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-33324827"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>1</strong></span> <div class="viewcount">vote</div> </div> </div> <div class="status answered-accepted"> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/33324827/yesod-hamlet-loop-broken-down-by-categories" class="question-hyperlink">Yesod hamlet loop broken down by categories</a></h3> <div class="excerpt">I am trying to loop through a list of products in hamlet each product has a category. I would like to break down the output to group into the categories with a list of products below each category heading. Is there a way to do this in hamlet while…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/haskell" class="post-tag grid--cell" title="show questions tagged 'haskell'" rel="tag">haskell</a> <a href="../../questions/tagged/yesod" class="post-tag grid--cell" title="show questions tagged 'yesod'" rel="tag">yesod</a> <a href="../../questions/tagged/hamlet" class="post-tag grid--cell" title="show questions tagged 'hamlet'" rel="tag">hamlet</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Oct 25 '15 at 00:25">asked Oct 25 '15 at 00:25</time> <a href="../../users/1557590/stewart-webb" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/1557590.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Stewart Webb" /> </a> <div class="s-user-card--info"> <a href="../../users/1557590/stewart-webb" class="s-user-card--link">Stewart Webb</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">189</li> <li class="s-award-bling s-award-bling__silver" title="2 silver badges">2</li> <li class="s-award-bling s-award-bling__bronze" title="14 bronze badges">14</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-31871425"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>1</strong></span> <div class="viewcount">vote</div> </div> </div> <div class="status answered-accepted"> <strong>2</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/31871425/separate-output-list-elements-by-delimiter-in-hamlet" class="question-hyperlink">separate output list elements by delimiter in hamlet</a></h3> <div class="excerpt">If I have the code below, how do I get rid of the last comma in the output? Is there a way to see where in the loop I am and whether I am at the end? {-# LANGUAGE QuasiQuotes #-} import Text.Blaze.Html.Renderer.String (renderHtml) import…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/haskell" class="post-tag grid--cell" title="show questions tagged 'haskell'" rel="tag">haskell</a> <a href="../../questions/tagged/hamlet" class="post-tag grid--cell" title="show questions tagged 'hamlet'" rel="tag">hamlet</a> <a href="../../questions/tagged/shakespeare-text" class="post-tag grid--cell" title="show questions tagged 'shakespeare-text'" rel="tag">shakespeare-text</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Aug 07 '15 at 06:55">asked Aug 07 '15 at 06:55</time> <a href="../../users/410102/akonsu" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/410102.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="akonsu" /> </a> <div class="s-user-card--info"> <a href="../../users/410102/akonsu" class="s-user-card--link">akonsu</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">28,824</li> <li class="s-award-bling s-award-bling__gold" title="33 gold badges">33</li> <li class="s-award-bling s-award-bling__silver" title="119 silver badges">119</li> <li class="s-award-bling s-award-bling__bronze" title="194 bronze badges">194</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-30004131"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>1</strong></span> <div class="viewcount">vote</div> </div> </div> <div class="status answered-accepted"> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/30004131/missing-imports-from-hamlet-libraries" class="question-hyperlink">Missing imports from Hamlet libraries</a></h3> <div class="excerpt">This is the code snippet from O reilly - Yesod - Widgets, getRootR = defaultLayout $ do setTitle "My Page Title" toWidget [lucius| h1 { color: green; } |] addScriptRemote…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/haskell" class="post-tag grid--cell" title="show questions tagged 'haskell'" rel="tag">haskell</a> <a href="../../questions/tagged/yesod" class="post-tag grid--cell" title="show questions tagged 'yesod'" rel="tag">yesod</a> <a href="../../questions/tagged/template-haskell" class="post-tag grid--cell" title="show questions tagged 'template-haskell'" rel="tag">template-haskell</a> <a href="../../questions/tagged/hamlet" class="post-tag grid--cell" title="show questions tagged 'hamlet'" rel="tag">hamlet</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card__deleted"> <time class="s-user-card--time" datetime="asked May 02 '15 at 15:32">asked May 02 '15 at 15:32</time> <div class="s-avatar s-avatar__32 s-user-card--avatar"> </div> <div class="s-user-card--info">user2879704</div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-29859284"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>1</strong></span> <div class="viewcount">vote</div> </div> </div> <div class="status answered-accepted"> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/29859284/yesod-mform-and-hamlet" class="question-hyperlink">Yesod Mform and hamlet</a></h3> <div class="excerpt">Hi I am new to yesod and following the documentation to make a form. In the documentation the form template was created in .hs file itself. But I have a separate hamlet where I want to customize. I want to access "fields" in my hamlet file. The…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/yesod" class="post-tag grid--cell" title="show questions tagged 'yesod'" rel="tag">yesod</a> <a href="../../questions/tagged/hamlet" class="post-tag grid--cell" title="show questions tagged 'hamlet'" rel="tag">hamlet</a> <a href="../../questions/tagged/yesod-forms" class="post-tag grid--cell" title="show questions tagged 'yesod-forms'" rel="tag">yesod-forms</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Apr 24 '15 at 23:43">asked Apr 24 '15 at 23:43</time> <a href="../../users/2675176/anirudh" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/2675176.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Anirudh" /> </a> <div class="s-user-card--info"> <a href="../../users/2675176/anirudh" class="s-user-card--link">Anirudh</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">33</li> <li class="s-award-bling s-award-bling__bronze" title="7 bronze badges">7</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-28369466"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>1</strong></span> <div class="viewcount">vote</div> </div> </div> <div class="status "> <strong>0</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/28369466/is-there-an-easy-way-to-embed-a-static-html-file-into-a-hamlet-template-in-yes" class="question-hyperlink">Is there an easy way to embed a static HTML file into a Hamlet template in Yesod</a></h3> <div class="excerpt">There are many cases when I have a lot of HTML that I just want to embed in my Hamlet templates as is, without explicitly converting it to Hamlet. I haven't really found a nice way of doing this, since if I use readFile in defaultLayout where the…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/html" class="post-tag grid--cell" title="show questions tagged 'html'" rel="tag">html</a> <a href="../../questions/tagged/templates" class="post-tag grid--cell" title="show questions tagged 'templates'" rel="tag">templates</a> <a href="../../questions/tagged/yesod" class="post-tag grid--cell" title="show questions tagged 'yesod'" rel="tag">yesod</a> <a href="../../questions/tagged/hamlet" class="post-tag grid--cell" title="show questions tagged 'hamlet'" rel="tag">hamlet</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Feb 06 '15 at 15:46">asked Feb 06 '15 at 15:46</time> <a href="../../users/72583/jakub-arnold" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/72583.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Jakub Arnold" /> </a> <div class="s-user-card--info"> <a href="../../users/72583/jakub-arnold" class="s-user-card--link">Jakub Arnold</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">85,596</li> <li class="s-award-bling s-award-bling__gold" title="89 gold badges">89</li> <li class="s-award-bling s-award-bling__silver" title="230 silver badges">230</li> <li class="s-award-bling s-award-bling__bronze" title="327 bronze badges">327</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-25642354"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>1</strong></span> <div class="viewcount">vote</div> </div> </div> <div class="status answered-accepted"> <strong>3</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/25642354/working-with-hamletfile-s-q-exp-return-value" class="question-hyperlink">Working with Hamletfile's Q Exp return value</a></h3> <div class="excerpt">Given this last line in my Haskell learning project: writeText $ TL.toStrict (renderHtml $(hamletFile "fileList.hamlet")) I would like to convert the output from hamletFile's signature of: FilePath -> Q Exp into the Html type expected by the…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/haskell" class="post-tag grid--cell" title="show questions tagged 'haskell'" rel="tag">haskell</a> <a href="../../questions/tagged/haskell-snap-framework" class="post-tag grid--cell" title="show questions tagged 'haskell-snap-framework'" rel="tag">haskell-snap-framework</a> <a href="../../questions/tagged/hamlet" class="post-tag grid--cell" title="show questions tagged 'hamlet'" rel="tag">hamlet</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Sep 03 '14 at 10:46">asked Sep 03 '14 at 10:46</time> <a href="../../users/1668057/ljs-dev" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/1668057.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="ljs.dev" /> </a> <div class="s-user-card--info"> <a href="../../users/1668057/ljs-dev" class="s-user-card--link">ljs.dev</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">4,449</li> <li class="s-award-bling s-award-bling__gold" title="3 gold badges">3</li> <li class="s-award-bling s-award-bling__silver" title="47 silver badges">47</li> <li class="s-award-bling s-award-bling__bronze" title="80 bronze badges">80</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="s-pagination pager fr"> <a class="s-pagination--item" href="../../questions/tagged/hamlet_page=3" rel="prev" title="Go to page 3">Prev </a> <a class="s-pagination--item" href="../../questions/tagged/hamlet_page=1" rel="" title="Go to page 1">1</a> <a class="s-pagination--item" href="../../questions/tagged/hamlet_page=2" rel="" title="Go to page 2">2</a> <a class="s-pagination--item" href="../../questions/tagged/hamlet_page=3" rel="" title="Go to page 3">3</a> <div class="s-pagination--item is-selected">4</div> <a class="s-pagination--item" href="../../questions/tagged/hamlet_page=5" rel="" title="Go to page 5">5</a> <a class="s-pagination--item" href="../../questions/tagged/hamlet_page=6" rel="" title="Go to page 6">6</a> <a class="s-pagination--item" href="../../questions/tagged/hamlet_page=5" rel="next" title="Go to page 5"> Next</a> </div> </div> </div> </div> </div> <script src="../../static/js/stack-icons.js"></script> <script src="../../static/js/fromnow.js"></script> </body> </html>