Template:Page upload
Jump to navigation
Jump to search
This is the "Page upload" template. (see here for a use-case) It should be called in the following format:
<gallery widths=340px mode="packed-overlay" parse-wikitext> {{{files}}} </gallery>
Attention! due to the issue mentioned here:
inner content of tag extensions won't be parsed as wikitext !
In order to allow it in certain circumstances (i.e. within the
tags gallery
and ref
) we propose
to use the attribute parse-wikitext
in conjuction
with the following MW patch:
if ( isset( $this->mTagHooks[$name] ) ) { // @see https://phabricator.wikimedia.org/T4700 // @see https://phabricator.wikimedia.org/T3310 if ( !empty( $content ) && array_key_exists( 'parse-wikitext', $attributes ) ) { $content = $this->internalParse( $content, false, $frame ); } // Note that $content may be null here, for example if the // tag is self-closed. $output = call_user_func_array( $this->mTagHooks[$name], [ $content, $attributes, $this, $frame ] ); } else {
(includes/parser/Parser.php -> extensionSubstitution )
see also
- https://www.mediawiki.org/wiki/Topic:Vnmqs9jfxz224tz1
- https://www.mediawiki.org/wiki/Extension:TemplateData
- https://www.mediawiki.org/wiki/Topic:Qhj3ybl2rnsiw6oc
- https://phabricator.wikimedia.org/T22707