What I mean is that the whole string
... {{inner1|...|???}} ... {{inner2|...|???}} ... {{inner17|...|???}} ...
{{inner18|...|???}} ...
is passed as the first argument of
{{outer| ... |language}}
instead of being hard coded in the template {{outer| ... |language}} since
the first argument is not known in advance.
Thanks,
Daniel Forgues
On Sun, Aug 16, 2015 at 5:01 AM, <wikitext-l-request(a)lists.wikimedia.org>
wrote:
> Send Wikitext-l mailing list submissions to
> wikitext-l(a)lists.wikimedia.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.wikimedia.org/mailman/listinfo/wikitext-l
> or, via email, send a message with subject or body 'help' to
> wikitext-l-request(a)lists.wikimedia.org
>
> You can reach the person managing the list at
> wikitext-l-owner(a)lists.wikimedia.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Wikitext-l digest..."
>
>
> Today's Topics:
>
> 1. Re: Outer templates modifying inner templates' parameters in
> nested template calls? (Arlo Breault)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 15 Aug 2015 15:30:56 -0700
> From: Arlo Breault <abreault(a)wikimedia.org>
> To: Parsoid and wikitext discussion <wikitext-l(a)lists.wikimedia.org>
> Subject: Re: [Wikitext-l] Outer templates modifying inner templates'
> parameters in nested template calls?
> Message-ID: <A99A5E66440D49C78EF7756667638071(a)wikimedia.org>
> Content-Type: text/plain; charset="utf-8"
>
> On Monday, July 13, 2015 at 9:02 PM, D F wrote:
> > Is there a way, or some hack, for an outer template to modify some inner
> templates' parameters in nested template calls? For example:
> >
> > {{outer| ... {{inner1|...|???}} ... {{inner2|...|???}} ...
> {{inner17|...|???}} ... {{inner18|...|???}} ... |language}}
> >
> > so that
> >
> > * if language = english, then ??? is replaced with en (before the inner
> templates are called)
> > * if language = spanish, then ??? is replaced with sp (before the inner
> templates are called)
> >
> > This way, we only have to change the language parameter of the outer
> template, and all the inner templates are called with the appropriate
> parameter. (Instead of manually modifying the numerous inner templates.)
> >
> > I know that inner templates are called before outer ones. (This would
> mean that the inner templates would execute with the ??? parameter,
> returning something that would allow the outer template to modify the ???,
> then the outer template would call back the inner templates with the
> modified parameter, before the outer template finally does it's own thing
> with the result. I don't know whether or not this could be hacked.)
> >
> Maybe I’m misunderstanding but you can pass template
> parameters as arguments to nested templates. As in,
>
> /Page
> {{aha|output=hello}}
>
> /Tempate:aha
> {{echo|{{{output}}}}}
>
> /Template:echo
> {{{1}}}
>
> The content of page will be “hello”. I used a named parameter
> so that the example is clearer; that isn’t necessary.
>
> Hope it helps.
>
>
> >
> > Thanks
> >
> > Daniel Forgues
> > _______________________________________________
> > Wikitext-l mailing list
> > Wikitext-l(a)lists.wikimedia.org (mailto:Wikitext-l@lists.wikimedia.org)
> > https://lists.wikimedia.org/mailman/listinfo/wikitext-l
>
>
>
>
>
>
> ------------------------------
>
> _______________________________________________
> Wikitext-l mailing list
> Wikitext-l(a)lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikitext-l
>
>
> End of Wikitext-l Digest, Vol 53, Issue 3
> *****************************************
>
Is there a way, or some hack, for an outer template to modify some inner
templates' parameters in nested template calls? For example:
{{outer| ... {{inner1|...|???}} ... {{inner2|...|???}} ...
{{inner17|...|???}} ... {{inner18|...|???}} ... |language}}
so that
* if language = english, then ??? is replaced with en (before the inner
templates are called)
* if language = spanish, then ??? is replaced with sp (before the inner
templates are called)
This way, we only have to change the language parameter of the outer
template, and all the inner templates are called with the appropriate
parameter. (Instead of manually modifying the numerous inner templates.)
I know that inner templates are called before outer ones. (This would mean
that the inner templates would execute with the ??? parameter, returning
something that would allow the outer template to modify the ???, then the
outer template would call back the inner templates with the modified
parameter, before the outer template finally does it's own thing with the
result. I don't know whether or not this could be hacked.)
Thanks
Daniel Forgues