« Multi Instance Test » : différence entre les versions
De Semantic MediaWiki - Sandbox
(trying preload) |
Aucun résumé des modifications |
||
Ligne 1 : | Ligne 1 : | ||
{{#formlink:form=HoldsMulti|target={{PAGENAME}}|Multi[1][item]=This should be in item 1 | {{#formlink:form=HoldsMulti|target={{PAGENAME}}|Multi[1][item]=This should be in item 1|Multi[2][item]=This would hold stuff for item 2}} | ||
[[Form:HoldsMulti]] sets up 2 instances of the same template to be embeded in the parameter 'multi' in [[Template:HoldsMulti]]. I'd like to define ''different'' default contents for each if possible. It seems to preview ok, but on saving, only values in the last instance are saved in all instances. | [[Form:HoldsMulti]] sets up 2 instances of the same template to be embeded in the parameter 'multi' in [[Template:HoldsMulti]]. I'd like to define ''different'' default contents for each if possible. It seems to preview ok, but on saving, only values in the last instance are saved in all instances. | ||
Being able to do this would really simplify a form and template definition I'm looking at making (would eliminate the need to define parameters and fields ie. item1, value2, item2, value2... item96, value96, etc. At least, I ''think'' being able to simplify it to a repeat template reference would be better. | Being able to do this would really simplify a form and template definition I'm looking at making (would eliminate the need to define parameters and fields ie. item1, value2, item2, value2... item96, value96, etc. At least, I ''think'' being able to simplify it to a repeat template reference would be better. |
Version du 15 décembre 2015 à 20:23
Form:HoldsMulti sets up 2 instances of the same template to be embeded in the parameter 'multi' in Template:HoldsMulti. I'd like to define different default contents for each if possible. It seems to preview ok, but on saving, only values in the last instance are saved in all instances.
Being able to do this would really simplify a form and template definition I'm looking at making (would eliminate the need to define parameters and fields ie. item1, value2, item2, value2... item96, value96, etc. At least, I think being able to simplify it to a repeat template reference would be better.