1. Kanarie: Template Processing
- Posted by cklester <cklester at yahoo.com> Aug 10, 2005
- 538 views
Tommy, I've got a template that conditionally includes another file, and that other file has knr fields in it that don't get processed. Is there something I should know about this (like, there's no provision for processing included files)? :) Example: {create_new=db:}{$dbcreate.form} {:create_new=table:}{$tablecreate.form} {:create_new=record:}<p>Create Record Form</p>{:create_new} In the above example, tablecreate.form looks like this: <form name="create_table"> <p>Table Name: <input type="text" name="txt_new_table_name" size="20"></p> <p><input type="submit" name="bttn_tablecreate" value="Create Table"></p> <input type="hidden" name="db" value="{current_db}"> </form> Notice the {current_db} field in the hidden db input. Is this a valid way to do things? :) -=ck "Programming in a state of EUPHORIA." http://www.cklester.com/euphoria/
2. Re: Kanarie: Template Processing
- Posted by Tommy Carlier <tommy.carlier at telenet.be> Aug 10, 2005
- 533 views
cklester wrote: > Tommy, > I've got a template that conditionally includes another file, and that other > file has knr fields in it that don't get processed. Is there something I > should > know about this (like, there's no provision for processing included files)? :) > > Example: > > {create_new=db:}{$dbcreate.form} > {:create_new=table:}{$tablecreate.form} > {:create_new=record:}<p>Create Record Form</p>{:create_new} > > In the above example, tablecreate.form looks like this: > > <form name="create_table"> > <p>Table Name: <input type="text" name="txt_new_table_name" size="20"></p> > <p><input type="submit" name="bttn_tablecreate" value="Create Table"></p> > <input type="hidden" name="db" value="{current_db}"> > </form> > > Notice the {current_db} field in the hidden db input. > > Is this a valid way to do things? :) Well, it would be nice if it worked like this. But all it does is literally insert the contents of the file, WHEN GENERATING THE OUTPUT. What you're looking for, is an include of a template in another template. This would mean that KTS would have to insert the contents of the file WHILE PARSING THE TEMPLATE. To be honest, I haven't thought of this situation before. And I can see certain practical problems that would need solving. I'll see if it can be implemented. From your example, I can see how useful it really is. -- The Internet combines the excitement of typing with the reliability of anonymous hearsay. tommy online: http://users.telenet.be/tommycarlier tommy.blog: http://tommycarlier.blogspot.com
3. Re: Kanarie: Template Processing
- Posted by "Juergen Luethje" <j.lue at gmx.de> Aug 10, 2005
- 515 views
Tommy Carlier wrote: > cklester wrote: > >> Tommy, >> I've got a template that conditionally includes another file, and that other >> file has knr fields in it that don't get processed. Is there something I >> should >> know about this (like, there's no provision for processing included files)? >> :) >> >> Example: >> >> {create_new=db:}{$dbcreate.form} >> {:create_new=table:}{$tablecreate.form} >> {:create_new=record:}<p>Create Record Form</p>{:create_new} >> >> In the above example, tablecreate.form looks like this: >> >> <form name="create_table"> >> <p>Table Name: <input type="text" name="txt_new_table_name" >> size="20"></p> >> <p><input type="submit" name="bttn_tablecreate" value="Create Table"></p> >> <input type="hidden" name="db" value="{current_db}"> >> </form> >> >> Notice the {current_db} field in the hidden db input. >> >> Is this a valid way to do things? :) > > Well, it would be nice if it worked like this. But all it does is literally > insert the contents of the file, WHEN GENERATING THE OUTPUT. > > What you're looking for, is an include of a template in another template. > This would mean that KTS would have to insert the contents of the file > WHILE PARSING THE TEMPLATE. To be honest, I haven't thought of this situation > before. And I can see certain practical problems that would need solving. > > I'll see if it can be implemented. From your example, I can see how useful > it really is. If I understand it correctly, this is the same that I've been asking for some time ago.This feature also would be useful for my Kanarie based Eu preprocessor. Regards, Juergen