Page MenuHomePhabricator

action=render should support section parameter (and perhaps action=view should too)
Closed, ResolvedPublic

Description

The idea is pretty clear (per request on the mediawiki-api list): action=render&section=2 should return a rendered version of the 2nd section only.


Version: 1.12.x
Severity: enhancement

Details

Reference
bz12861

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:02 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz12861.
bzimport added a subscriber: Unknown Object (MLST).

Also perhaps allow using the anchor name: Pie#Apple : section=Apple.

But what about subsections with the same name? MediaWiki already deals
with this case by appending _1, _2, ... so no problem.

(In reply to comment #1)

Also perhaps allow using the anchor name: Pie#Apple : section=Apple.

But what about subsections with the same name? MediaWiki already deals
with this case by appending _1, _2, ... so no problem.

That's bug 15575, which is less related than it seems to be. Adding the section= parameter to action=raw will probably just use a method of Article or Parser (don't remember which one) to get the section text. The real problem in bug 15575 is that that method takes a section number rather than a name.

  • This bug has been marked as a duplicate of bug 9711 ***