0
点赞
收藏
分享

微信扫一扫

How to fold up content in MediaWiki


If you paste a very very long code into mediawiki, you may find that code takes too much space that it is not easy to find the useful content. Why not add a new template that can fold up the code?


add two tags: {{hideBegin}}, {{hideEnd}}, your wiki code looks like this

{{hideBegin}}
Long Code
Long Code
Long Code
{{hideEnd}},



then preview the page, and edit that two new template:

for hideBegin:

<div style='border:0px;padding:3px; PADDING:0px; width:100%; height:480px; LINE-HEIGHT: 20px; OVERFLOW: auto;'><div class="NavContent" style="{{{ContentStyle|}}}"><noinclude></div></div>


{{Documentation}}


[[en:Template:hideBegin]]
[[ja:Template:hideBegin]]
</noinclude>



for hideEnd:

</div></div><noinclude>{{Documentation}}</noinclude>



That's all.

WikiMedia template mechanism is really COOL!

举报

相关推荐

0 条评论