Clients may want to handle pages with different content models in a different manner, so it should be possible to retrieve a page's content model via mobileview.
Description
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Add contentmodel prop to mobileview Api module | mediawiki/extensions/MobileFrontend | master | +9 -0 |
Related Objects
Event Timeline
Just to be clear: You want to return the contentmodel for each request to mobileview or just, if it is requested? Wouldn't it be possible to use query + prop info[1] for that?
[1] http://www.mediawiki.org/w/api.php?action=query&prop=info&format=json&titles=MediaWiki
Either's fine, but it probably makes sense to only include it if it's specifically requested.
You could add a "contentmodel" prop, just like displaytitle and languagecount.
Wouldn't it be possible to use query + prop info[1] for that?
Yes. I requested this for T68320, where running an extra network roundtrip would result in slowdown of editing workflow and extra data usage for the 0.0001% chance that someone wants to edit a non-wikitext page. That tradeoff isn't acceptable from a performance standpoint. But, having this included in the original request to retrieve the content of the page solves that problem.
Change 206651 had a related patch set uploaded (by Florianschmidtwelzow):
Add contentmodel prop to mobileview Api module