Transclude a category in MediaWiki

白昼怎懂夜的黑 提交于 2019-12-05 00:09:17

Try http://www.mediawiki.org/wiki/Extension:CategoryTree, with the following syntax:

Category A contains these pages:
<categorytree hideroot="true" namespaces="-">Category A</categorytree>
Laurent Alquier

If you want more control over how the results are displayed, you may want to give Semantic Mediawiki a try.

The syntax would look something like:

Pages in Category A:

{{#ask:[[Category:A]]
|format=ul
}}

Even if you are not using semantic properties, you can use the query mechanism to display pages based on categories.

The MediaWiki extension Dynamic Page List (http://www.mediawiki.org/wiki/Extension:DynamicPageList_(third-party)) does this with ease, producing bulleted lists of articles in a category:

Pages in Category A:
<dpl>
category=A
</dpl>

without a heavyweight solution like Semantic MediaWiki. Just install and go.

DPL has a rich syntax for more powerful dynamic lists. For example, to produce a numbered list in 3 columns:

<dpl>
category=A
mode=ordered
columns=3
</dpl>
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!