> > I'm trying to build template-based site layout following recipe from
> http://lesscode.org/projects/kid/wiki/LayoutTemplateRecipe page (second one, 
> that doesn't
> use py:layout).
> 
> Out of curiosity, why did you decide not to use py:layout?

Actually, I tried py:layout first because it looked more appropriate for my 
case. But I failed get it to work:
1. TG do not detect changes in layout.kid and do not reload it
2. can't put non-ascii string in layout_params global
3. base layout not sees "outer" variables passed to page.kid
4. somehow it didn't work

So I scraped it and rewritten using py:match. As it turns out problems 1 and 3 
didn't go but I only figured out a bit later. It was exhausting long-day dev 
session and I did not keep the layout-based version to show, sorry.
 
> > There is master.kid which contains py:match elements for menu, header, 
> > footer and there
> is page.kid itself that contains main content. The problem I face is that I 
> need to render
> menu (matched from master.kid) differently on different pages. When I had 
> monolithic page I
> just passed in a variable and the react according to variable's value. Now I 
> can no longer
> access variables from master.kid, where the menu is being defined.
> >
> > Is there a way to access that "outer" variables passed to page.kid from 
> > master.kid match
> template? If no, how you're supposed to deal with such situations?

Well, I kinda figured it out. I'm using TurboGears so I just put my vars in 
stdvars namespace and which made them automagically available through tg 
variable.
 
> Could you provide a short example that reproduces the problem?

I tried to extract a sample which used master/page templates with a variable 
but it does work fine. 8-/

Anyway, my problem now solved, sorry for the fuzz.
 



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
kid-template-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kid-template-discuss

Reply via email to