On Thu, Sep 28, 2017 at 7:53 AM, mathieu stumpf guntz <
[email protected]> wrote:

>
>
> Le 24/09/2017 à 19:31, bawolff a écrit :
>
>> Why not just make a template containing <includeonly>{{ping|first
>> user|second user|third user|...}}</includeonly>
>>
>> Your issue is almost certainly that the pipes aren't being tokenized
>> as argument separators when they come from a transcluded template.
>> (Its the same reason that {{!}} works in tables, except in reverse).
>>
>> Alternatively, {{ping|{{subst::Wiktionary/Tremendous Wiktionary User
>> Group/affiliates}}}} would probably work.
>>
> I encounter a similar problem in an other template I'm trying to write.
> Indeed, `subst` works as expected, but I would like to keep the call as is.
> So that when saving, the list won't be expanded, but will stay dynamic. So
> using the same example, something like
>
> {{ping|{{param::Wiktionary/Tremendous Wiktionary User Group/affiliates}}}}
>
> Is there already a way to do that.
>

Such a thing would be incompatible with not expanding a template parameter
until it's actually needed, since it wouldn't allow MediaWiki to know what
parameters were actually specified until after expansion..

>
> The other option I see is that the called template or module called should
> directly return the whole call. Actually, with a frame:expandTemplate or
> frame:preprocess it does work for the case I was asking this question.
>

Those are all possible solutions. I'd recommend avoiding frame:preprocess
in favor of frame:expandTemplate if you go that route.

-- 
Brad Jorsch (Anomie)
Senior Software Engineer
Wikimedia Foundation
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to