Instead of static inheriting the files, like this:
<%inherit file="base.mako"/>
I want to set the file names dynamically in the controller with the
context variable so that I can do this:
<%inherit file="${c.base_file}"/>
I tired but I got the "global name 'c' not defined" error.
Than I tried:
<%inherit file="${context.get('c.base_file')}"/>
But than c.base_file is evaluated to 'None' even though I have
assigned value to it in the controller.
Also, I tried to do:
<%namespace file="${c.function_file}" import="a_function"/>
I got: TemplateLookupException: Cant locate template for uri '/page/$
{c.function_file}'
so the expression inside ${} is not even evaluated...
Is it possible to use dynamic file names for mako funcions 'inherit'
and 'namespace' etc??
Thanks a lot.
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.