Différences entre les versions de « Multi Instance Test »

De Semantic MediaWiki - Sandbox

(notes)
 
(20 versions intermédiaires par le même utilisateur non affichées)
Ligne 1 : Ligne 1 :
{{HoldsMulti
 
|Multi={{Multi
 
|item=Some stuff different than the first instance.
 
|result=this is item 2
 
}}{{Multi
 
|item=Some stuff different than the first instance.
 
|result=this is item 2
 
}}
 
}}
 
  
{{#formlink:form=HoldsMulti|target={{PAGENAME}} }}
+
{{#formlink:form=HoldsMulti|target={{PAGENAME}}/3|query string=preload=&Multi[1][label]=Foo&Multi[2][label]=Bar&Multi[3][label]=Bar3}}
  
[[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]] - [[Template:HoldsMulti]] - [[Template:Multi]]
 +
 
 +
Testing preloading of field values in multiple instance template.  
 +
 
 +
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.

Dernière version du 15 décembre 2015 à 23:46

Multi Instance Test/3

Form:HoldsMulti - Template:HoldsMulti - Template:Multi

Testing preloading of field values in multiple instance template.

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.

Les cookies nous aident à fournir nos services. En utilisant nos services, vous acceptez notre utilisation de cookies.