Re: [Cheetahtemplate-discuss] Adding a context to #include
Brought to you by:
rtyler,
tavis_rudd
From: Tavis R. <ta...@re...> - 2004-07-07 19:15:50
|
Hi Scott, it's ok with me. I just haven't had time to test it fully. Thanks for the offer of help. I've added your sourceforge account to the developers list. Feel free to check it in, provided all the unit tests pass. Cheers, Tavis On Tuesday 06 July 2004 16:29, Scott Sanders wrote: > Any luck on this? Is it OK with you guys? > > Can we get it or some version that looks like it checked into CVS? > > I am happy to help with Cheetah, if you want the help. My sourceforge > id is stonecobra. > > To see how I am using Cheetah, check out my blog at > http://dotnot.org/blog/ > > Thanks > Scott Sanders > > On Jun 24, 2004, at 12:23 PM, Scott Sanders wrote: > > Sure thing. Attached are the diff to Template and Parser. > > > > Disregard the Template change on line 388, that is to solve my > > relative path issue, which is really just a hack at the moment. > > > > Thanks > > Scott > > <Parser.diff.txt><Template.diff.txt> > > > > On Jun 24, 2004, at 12:02 PM, Tavis Rudd wrote: > >> Hi Scott, > >> can you send me a patch file (diff -u) of the changes. > >> Cheers, > >> Tavis > >> > >> On Thursday 24 June 2004 11:35, Scott Sanders wrote: > >>> I have hacked on Cheetah to make it submit to my bidding :) > >>> > >>> I have modified #include to allow something like: > >>> > >>> #include context=[$context.child] "child.tpl" > >>> > >>> $context is now a global that can be set using #set global > >>> $context=whatever. > >>> > >>> This allows all templates that I use to know nothing about the parent > >>> that called them, as they would only refer to the $context variable. > >>> > >>> It was about 10 lines of code in Parser.py, and 5 lines in > >>> Template.py > >>> to set the child context and unset the child context after the > >>> include > >>> is processed. > >>> > >>> Is this something that the Cheetah team would like to include. It > >>> allows the templates to become quite a bit more powerful WRT to where > >>> they are used. I find it is a must have for any hierarchical > >>> component-based template solution. > >>> > >>> Comments? > >>> > >>> Thanks, > >>> Scott Sanders > >>> > >>> > >>> > >>> ------------------------------------------------------- > >>> This SF.Net email sponsored by Black Hat Briefings & Training. > >>> Attend Black Hat Briefings & Training, Las Vegas July 24-29 - > >>> digital self defense, top technical experts, no vendor pitches, > >>> unmatched networking opportunities. Visit www.blackhat.com > >>> _______________________________________________ > >>> Cheetahtemplate-discuss mailing list > >>> Che...@li... > >>> https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss > > ------------------------------------------------------- > This SF.Net email sponsored by Black Hat Briefings & Training. > Attend Black Hat Briefings & Training, Las Vegas July 24-29 - > digital self defense, top technical experts, no vendor pitches, > unmatched networking opportunities. Visit www.blackhat.com > _______________________________________________ > Cheetahtemplate-discuss mailing list > Che...@li... > https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss |