Template:Page upload: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
'''Attention'''! | This is the "Form article" template. | ||
It should be called in the following format: | |||
<pre> | |||
<gallery widths=340px mode="packed-overlay" parse-wikitext> | |||
{{{files}}} | |||
</gallery> | |||
</pre> | |||
'''Attention'''! due to the issue mentioned here: | |||
* https://phabricator.wikimedia.org/T4700 | * https://phabricator.wikimedia.org/T4700 | ||
Line 7: | Line 16: | ||
inner content of tag extensions won't be parsed as wikitext ! | inner content of tag extensions won't be parsed as wikitext ! | ||
In order to allow it in certain circumstances (i.e. within the | In order to allow it in certain circumstances (i.e. within the | ||
tags <code>gallery</code> and <code>ref</code> | tags <code>gallery</code> and <code>ref</code>) we propose | ||
to use the attribute <code>parse-wikitext</code> in conjuction | |||
with the following MW patch: | |||
<pre> | <pre> | ||
// @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 ); | |||
} | |||
</pre> | </pre> | ||
(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 | |||
</noinclude> | </noinclude> | ||
<gallery widths=340px mode="packed-overlay" parse-wikitext> | <gallery widths=340px mode="packed-overlay" parse-wikitext> | ||
{{{files}}} | {{{files}}} | ||
</gallery> | </gallery> |
Revision as of 08:26, 5 December 2023
This is the "Form article" template. 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:
// @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 ); }
(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