https://bugzilla.wikimedia.org/show_bug.cgi?id=30011
--- Comment #2 from LY Meng <[email protected]> 2011-08-03 00:28:05 UTC --- Hello, I modified the code so that it works with {{{field|town_mayors|embedder}}} and: {{{for template|Mayor|embed in field=Town[town_mayors]}}} Actually, using only "hidden" would make difficult to especially identify this field asa placeholder to embed a field. Since at form generation the field would actually contain the list of Mayor templates, there wouldn't be any way to tell whether it's supposed to be something to delegate to an another Form or if it's a normal variable. Right now the process is done on the fly, so if a field is seen as a placeholder through the "embedder" attribute, the data is moved out of the template and added at the end of the parsed string, so that it will be later picked up by an another approriate form. To get the process working only with a "hidden" attribute, we would need to have a first loop parsing all the code to detect which forms are here, where are the placeholders and make a hierarchy of things to nest, and from that identify which hidden fields are true hidden fields, and which fields are placeholders. That would need large structure modifications (but would also allow infinite level of nest forms I think). Right now the limitation with the "on the fly" parse is that nested forms have to be declared after the main form that will embed them. It is possible to embed multiple forms in a base form, but trying to embed a form into a form that is itself embedded in something else doesn't seem to work. For that,we would need to use the first parse loop described above, and then probably generate everything recursively. About the current syntax, if the user mistakes the "embed in field" attribute's value, the Templates parsed by this form (ex: Mayor) will still be taken out of the main template and parsed as if it were normal "multiple forms", and then saved outside of the main template. Fixing the "embed in field" attribute's value, reediting the page and resaving it will reintegrate these templates (Mayor) into the approriate field in the main template (Town). It can be used deliberately as a trick to grab and move this kind of data inside/outside of templates. -- Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
