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 6556093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:54:00+00:00 2026-05-25T12:54:00+00:00

in my default-layout.hamlet : !!! <html lang=en> <head> <meta charset=utf-8> <title>#{pageTitle pc} ^{pageHead pc}

  • 0

in my default-layout.hamlet:

!!!
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>#{pageTitle pc}
    ^{pageHead pc}
  <body>
    <div id="main">
      <div id="header">
        ????
      <div id="content">
        ^{pageBody pc}

from a handler function, I need to replace the ???? above with some HTML contents.

how is this done?

thanks for any input.

EDIT:

I am looking for functionality similar to, for example, django’s template blocks. I can define a block inside a template and the handler that uses this template for rendering, can fill in the template’s blocks with the needed contents. Right now, yesod has effectively a single block in a template’s body. that “defined” by the call ^{pageBody pc}. I know I can build up the output generated by pageBody any way I want using addWidget etc., but right now I will need to output my <div id="header"> and <div id="content"> too and I want to avoid that because all my handlers will have to output these div‘s to have the same markup structure in all the pages.

  • 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-25T12:54:01+00:00Added an answer on May 25, 2026 at 12:54 pm

    I think the answer is to define a function besides defaultLayout. The only thing that’s magical about defaultLayout is that subsites (e.g., auth) and error messages use it by default. But you could define a “myDefaultLayout” that takes the other pieces of content you want. You could even define a helper function that wraps up the extra blocks into a single block and then passes that to defaultLayout.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code snippet in an email layout: <div> <?php echo $this->Html->image('Layouts/default/Logo.png', array(
the directory structure I'm trying to achieve would be this: application/default/views/layouts/layout.phtml application/default/views/scripts/index/index.phtml application/admin/views/layouts/layout.phtml application/admin/views/scripts/index/index.phtml
I have an application layout in my rails app to give a default header/footer
this is my pom.xml <repositories> <repository> <url>http://download.java.net/maven/2/</url> <id>hibernate-support</id> <layout>default</layout> <name>Repository for library Library[hibernate-support]</name> </repository>
I just reformatted the default layout of my CakePHP application. I eliminated as much
I'd like to name my default layout file something other than layout.phtml, since it
the default layout of Category page is 3column, I would Like to change it
I got a JViewport correctly scrolling using the default layout manager (using viewport.setViewPosition), but
I have a MVC3 application, based on default layout from VS 2010, which I
Is it possible to reset a default layout from within a before_filter method in

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.