Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6955279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:42:57+00:00 2026-05-27T14:42:57+00:00

I want to integrate Snap’s templating and Blaze HTML builder by building some HTML

  • 0

I want to integrate Snap’s templating and Blaze HTML builder by building some HTML and binding it to a tag for use in a Heist template. Here is what I have attempted.

numbers :: Int -> Splice AppHandler
numbers n = return $ [TextNode $ T.concat.toChunks.renderHtml $ do
                    p "A list of natural numbers"
                    ul $ forM_ [1 .. n] (li .toHtml)]

This does not work as intended since snap renders the HTML string directly to the generated page. How do I get snap to render blaze generated HTML?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T14:42:58+00:00Added an answer on May 27, 2026 at 2:42 pm

    If you want to stick with a Heist splice, the function renderHtmlNodes from the Text.Blaze.Renderer.XmlHtml module in the xmlhtml package should help a lot in this case.

    Docs: http://hackage.haskell.org/packages/archive/xmlhtml/0.1.5.2/doc/html/Text-Blaze-Renderer-XmlHtml.html

    I don’t fully understand your example, but this is how I would modify it to incorporate my suggestion:

    numbers :: Int -> Splice AppHandler
    numbers n = return $ renderHtmlNodes $ do
                        p "A list of natural numbers"
                        ul $ forM_ [1 .. n] (li .toHtml)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to integrate some existing Perl code with ASP.NET. I see plenty examples
I want to integrate photologue with my Django app and use it to display
I am building a website and I want it to integrate with Facebook Connect.
If I want to integrate DotNetOpenAuth (primary for people to use their Google/Yahoo accounts
I'm developing a game and want to integrate some animations, I've thought about making
I want to integrate Twitter in my iPhone App for getting some tweets of
I want to integrate a full HTML framework (ie HTML/CSS/JavaScript) inside an iOS app
I want to integrate a php code into my application phoneGap(HTML). So, I tried
I want to integrate the MySQL fulltext search function in my PHP site. I
i want to integrate maps using map kit in iphone, and i am successful

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.