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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:13:39+00:00 2026-05-28T04:13:39+00:00

In the pyramid docs there is a nice tutorial on UX stuff here: http://docs.pylonsproject.org/projects/pyramid_tutorials/en/latest/humans/creatingux/step07/index.html

  • 0

In the pyramid docs there is a nice tutorial on UX stuff here:

http://docs.pylonsproject.org/projects/pyramid_tutorials/en/latest/humans/creatingux/step07/index.html

One thing I noticed though is in the tutorial they are setting up and passing around the ‘global layout’ explicitly in the code (see below). I thought this was unusual and unnecessary because I’ve always just used the ‘load’ command as shown in the docs here:

http://chameleon.repoze.org/docs/latest/

Is this just a personal preference issue or are there real advantages to setting up and using the ‘global layout’ in this way?

Tutorial base view class:

class Layouts(object):
    @reify
    def global_template(self):
        renderer = get_renderer("templates/global_layout.pt")
        return renderer.implementation().macros['layout']

Tutorial template file:

<div metal:use-macro="view.global_template">
    <div metal:fill-slot="content">
        <p>Home page content goes here.</p>
    </div>
</div>

But in my template files I just use:

<div metal:use-macro="load: global_layout.pt">
    <div metal:fill-slot="content">
        <p>Home page content goes here.</p>
    </div>
</div>
  • 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-28T04:13:40+00:00Added an answer on May 28, 2026 at 4:13 am

    The indirect way (via view) gives you more flexibility. The benefits are not so obvious in a small project, but this approach surely pays off in a larger one. The “load:” is harcoding your main_template (in Zope/Plone-speak) to be here. With the view, it can come from anywhere and changed independently of your templates.

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

Sidebar

Related Questions

I'm try to compiling the libpmk library http://people.csail.mit.edu/jjl/libpmk/#docs following the documentation here http://people.csail.mit.edu/jjl/libpmk/documentation/ .
I have a Pyramid app that I've been developing and viewing locally through http://localhost:6543
Is there a way to configure Pyramid so that when MongoDB fails over to
Is there any way to get pyramid absolute application url in main() function? I
Pyramid Framework comes with a sample tutorial of sql alchemy that uses sqlite. The
A friend was telling me the other day that there is a pyramid for
I noticed in the Pyramid + SQLAlchemy + URL Dispatch Wiki Tutorial that the
I'm moving from Pylons to Pyramid/Akhet, and I'm confused by the setup. Is there
I'm learning pyramid. I'd like to see me some open source projects and get
I'm trying to create a pyramid of circles to my game, looking similar to

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.