Page MenuHomePhabricator

Give editintro an own css id/class
Closed, ResolvedPublic


When I create pages using editintro=Template:Foo I'd like too the included content of Template:Foo in a div with an own css class or id to give it some background etc. which is even more useful when you start with preview=yes.

Version: unspecified
Severity: enhancement



Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 11:49 PM
bzimport set Reference to bz30959.
bzimport added a subscriber: Unknown Object (MLST).
  • I'd like to see the included content...

Best would be if the content was passed to [[MediaWiki:Editintro]] for full customization options.

To clarify bug report:
When you use the editintro url parameter to add some template to the top of the edit page (for example: . People often do this to have custom help text), the included template should be contained within a <div> tag, which has some class (say mw-editintro). So you would have <div class="mw-editintro">TEMPLATE HERE</div> instead of current system where template is just plopped in without a containing <div> tag.

See also EditPage::showCustomIntro in includes/EditPage.php for where its implemented.

Best would be if the content was passed to [[MediaWiki:Editintro]] for full
customization options.

That seems overkill. Lets stick with the css class, unless you have a compelling use case for using the message.

andnlnbn18 wrote:

can i work on it??

It is up to you to test and check your patch to see if it works.
I cannot judge the code that you pasted on as it is not in patch format and it is cumbersome to compare line for line manually. Please always provide changes in patch format. You find pointers in the link in comment 4.

There is actually a fairly obvious syntax error in the linked pastebin.... but yes, please try it on your own mediawiki and see for yourself if it appears to work correctly.

Change 115607 had a related patch set uploaded by Lekshmi:
editintro given a css class of its own

Note, that editnotices are not included.

Will appear on wikipedia on about June 12th

Change 115607 merged by jenkins-bot:
editintro given a css class of its own