Re: [Rest2web-develop] Multiple templates, same content
Brought to you by:
mjfoord
From: Michael F. <fuz...@vo...> - 2006-02-23 23:11:30
|
Peter Brett wrote: > On Thursday 23 February 2006 13:43, Fuzzyman wrote: > >> Peter Brett wrote: >> >>> On Thursday 23 February 2006 11:13, Fuzzyman wrote: >>> >>>> Alternatively the *template* could probably already check the command >>>> line arguments. This would break if I added any other command line >>>> arguments. At the moment the first argument is always the config file, >>>> but no other command line options are used. >>>> >>> What about having a special argument, e.g. '--' after which all remaining >>> arguments are passed to the template? Either that or a >>> '--template-args=<string>'... >>> >> [...] >> >> How about : >> >> '--template-file=<path>' >> >> ? >> >> Would be easy enough to implement, and can be overridden for individual >> files or directories in the restindex. >> >> > > Can we have --template-args=<string> _as_well_? I've already thought of some > excellent uses for it. I don't see any direct problems with putting it in - > if users want to do bizarre conditional logic in their template, why the hell > not? > Ok, but [part of..] my proposal is more *general*. I propose to allow the setting of 'uservalues' (note the plural) from the command line. These can be used for whatever you want - including conditional logic in the templates. :-) I haven't decided on the syntax, but it's going to be a couple of weeks before I can implement this. rest2web is gradually climbing to the top of my 'todo' list. Now if only a Firedrop user didn't keep adding features, I'd be free to work on rest2web. *sigh* All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml > Peter :) > > |