Hi,
I have written some extensions for forms that use template parameters.
I have found that it appears to be impossible to pass a template
parameter to an extension. I think this make be an upshot of the
design, but before I totally give up I thought I'd see if anyone here
had tried to do the same thing.
Ideally my extension on a template page would look like this:
<textbox>{{{name|Not set}}}</textbox>
then used like this:
{{form:dynamicform|name=Alex}}
I am embedding them into the webpage as Divs, and then using Java
script to mark them up.
However. I cannot get the parser to expand the "name" parameter for my
extension. I get passed {{{name|Not Set}}}. OK, so I'll call
parsetags, but that seems to only pick up "Not set" when called from
my extension, not "Alex".
My eventual solution was partially formed HTML:
<textbox id=name />{{{name}}} <close textbox/>
Note the closed extension tags. The extension hacks around with the
parser adding tokens and replacing them after strip tags. It creates
an open div tag, and then a close div tag using <close> extension.
This works and used properly produces well formed HTML, but is not
elegant and is prone to error. I was hoping the new parser ordering
might help my plight, but it didn't. Am I going about this the wrong
way?
Kind regards,
Alex
--
Alex Powell
Exscien Training Ltd
Tel: +44 (0) 1865 920024
Direct: +44 (0) 1865 920032
Mob: +44 (0) 7717 765210
skype: alexp700
mailto:alexp@exscien.com
http://www.exscien.com
Registered in England and Wales 05927635, Unit 10 Wheatley Business
Centre, Old London Road, Wheatley, OX33 1XW, England