Шаблон:Collapse/doc: различия между версиями

857 байт добавлено ,  23:22, 10 декабря 2016
en>Primefac
(Undid revision 741003102 by Primefac (talk) derp. never mind. wrong template)
en>AhmadF.Cheema
Строка 164: Строка 164:


== Re-using at other wikis ==
== Re-using at other wikis ==
This template depends upon having rules for the three classes (collapsible, uncollapsed, and collapsed) in the appropriate CSS files, and some related JavaScript installed.
This template depends upon having rules for the three classes (collapsible, uncollapsed, and collapsed) in the appropriate CSS files, and some related JavaScript installed. This template transcludes {{tl|main other}} and {{tl|lorem ipsum}}, which should also be imported at the same time.


This template transcludes {{tl|main other}} and {{tl|lorem ipsum}}, which should also be imported at the same time.
For MediaWiki versions ≥ 1.18, this template can simply be exported and then imported into another MediaWiki installation. Changes to the source code that will need to be made are:
:* <code>class="collapsible</code> needs to be changed to <code>class="mw-collapsible</code> (probably because the class had apparently been deprecated since ''MediaWiki v1.20'').
:* <code>|#default=collapsed}}</code> changed to <code>|#default=mw-collapsed}}</code>.
:* Some additional changes to the source code will need to be made in order for this template to become usable on the Main/Article (ns:0) [[mw:Help:Namespaces|namespace]].
 
The toggle text can be edited at external Wiki's [[MediaWiki:Collapsible-expand]] and [[MediaWiki:Collapsible-collapse]] pages. Further information at [[mw:ResourceLoader/Modules#jquery.makeCollapsible|jquery.makeCollapsible module]].


== See also ==
== See also ==
Анонимный участник