Page MenuHomePhabricator

Template call as headerLabelPage
Closed, ResolvedPublic

Description

It should be possible to do a template call in the headerLabelPage instead of having a page per campaign per language.

So it should be possible to do:
{{Wiki Loves Monuments header|lang=$1|campaign=$2}}

or

{{WLM-is-running|$2| {{Upload_campaign_header_$2 }} |before={{Upload_campaign_header_Wiki_Loves_Monuments_2012_August/$1}}|after={{Upload_campaign_header_Wiki_Loves_Monuments_2012_finished/$1}} }}

(which would have been very useful for the contest start)

The same field can double for both purposes, it's as simple as checking if it begins and ends with {{ }}, which are illegal for a page name.

The templates should of course work as any normal template, respect <noinclude>, allow autotranslation, etc.

Note that variable $2 for the campaign name would be a new one
(we would really need {{#sub: $2 | 4}}, but that can be workarounded with an ugly switch).

Same support would be interesting for other fields like idFieldLabelPage and thanksLabelPage, too.


Version: master
Severity: minor

Details

Reference
bz39910

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:57 AM
bzimport added a project: UploadWizard.
bzimport set Reference to bz39910.

Any reason we can't just get rid of the entire 'page name' business and just have wikitext everywhere?

We had talked about this on irc. That's also fine for me. You want some backwards compatibility, but that's outside WLM needs.
I would bump the major version of the extension on the change.

Feel free to duplicate this to a “use wikitext everywhere” bug.

A *huge* patch got merged into UW earlier today, which was an almost-full-rewrite of the campaigns code. So a major revision bump is coming anyway :)

Change 72869 had a related patch set uploaded by Yuvipanda:
Enable use of wikitext in field labels

https://gerrit.wikimedia.org/r/72869