Page MenuHomePhabricator

As an editor I want to be able to control the page banner I see on a page
Closed, ResolvedPublic

Description

As an editor I should be able to add a magic word that updates the banner on the current page.

Suggested usage:
{{PAGEBANNER|File:Foo.jpg}}

Event Timeline

Jdlrobson raised the priority of this task from to Needs Triage.
Jdlrobson updated the task description. (Show Details)
Jdlrobson added subscribers: Sumit, Aklapper, Jdlrobson.
Sumit added a comment.May 4 2015, 5:13 PM

In T94772, I'm rendering a static banner, using 'viewBanner' hooked to 'ArticleViewHeader' which ideally should insert a banner only when no {{PAGEBANNER...}} is found. To achieve that, I can use a control variable to suppress the functionality of 'viewBanner' whenever the parser detects the {{PAGEBANNER..}} magic word. However this introduces coupling between these two functions, with a variable. Is this approach fine, or can there be a better solution?

Bene added a comment.EditedMay 4 2015, 5:17 PM

I'd rather use {{PAGEBANNER:File:Foo.jpg}} (: instead of |) as it is done for {{DISPLAYTITLE}} and other configurations as well.

This makes clear that it is a magic word and not a template.

Jdlrobson renamed this task from As a user I want to be able to control the page banner I see on a page to As a user I want to be able to control the size of the page banner I see on a page.May 4 2015, 6:05 PM
Jdlrobson renamed this task from As a user I want to be able to control the size of the page banner I see on a page to As a user I want to be able to control the page banner I see on a page.
Jdlrobson set Security to None.

+1 to @Bene suggestion.

Jdlrobson renamed this task from As a user I want to be able to control the page banner I see on a page to As an editor I want to be able to control the page banner I see on a page.May 5 2015, 8:58 AM

Change 209432 had a related patch set uploaded (by Sumit):
WikidataPageBanner: PAGEBANNER magic word added

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

Change 209432 merged by Jdlrobson:
WikidataPageBanner: PAGEBANNER magic word added

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

Jdlrobson closed this task as Resolved.May 13 2015, 8:11 AM
Jdlrobson claimed this task.