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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:11:49+00:00 2026-05-26T19:11:49+00:00

Goal: To access myargs in both base and child templates. Currently I can only

  • 0

Goal: To access myargs in both base and child templates. Currently I can only access them in one or the other.

Call:

child.render(myargs={'a':2, b:'5'})

Base excerpt:

<%page args="myargs=None, **kwargs"/>
% if myargs['a']:
    a is: ${myargs['a']}
% endif
${self.body(myargs=myargs)}

Child excerpt version 1:

<%page args="myargs=None, **kwargs"/>
<%inherit file="/base.html" />

% if myargs['b']:
    b is: ${myargs['b']}
% endif

Child excerpt version 2:

<%page args="myargs=None, **kwargs"/>
<%inherit file="/base.html" />
<%def name="body()">
% if myargs['b']:
    b is: ${myargs['b']}
% endif
</%def>

Using child version 1, child throws error because myargs is undefined, and base works.
Using child version 2, base throws error because myargs is undefined, and child works.

These are not exact examples, but it’s the essence of my dilemma. If someone can explain how to pass variables through the inheritance chain that would be lovely. Unfortunately the documentation for Mako seems to skip this section.

  • 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-26T19:11:50+00:00Added an answer on May 26, 2026 at 7:11 pm

    Nice easy solution lol.

    It turns out “page args” are not useful for this cause, in fact they were creating the problem by overwriting “myargs” with “None” on one of the pages. Keyword variables can be accessed directly from both files without using “page args”.

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

Sidebar

Related Questions

rails version rails 3.2.1 Goal: Access ActiveAdmin login page only office computer. Code: route.rb
The goal is to access the nth element of a vector of strings instead
I have a project here the goal is to merge multiple Access DB's into
Goal : I wants when I drag image it become fade so we can
Goal: Once i click on the start button on my user interface, i currently
My goal is to connect to an OWA page (Microsoft Office Outlook Web Access
My goal is to have user-uploaded files (mostly PDF) available for download only via
Is there anyway that I can save or access a local variable outside of
I am using DataMapper for Database access. My goal is to send the models
My Goal: A form field (in MS Access) that is has some drop down

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.