關於 <noinclude></noinclude> 語法

6 views
Skip to first unread message

Moses

unread,
Oct 24, 2005, 1:24:50 AM10/24/05
to zh.wikipedia
以下內容轉自郵件列表:

Tim Starling t.starling at physics.unimelb.edu.au Mon Aug 22 14:49:36
UTC 2005

I wrote a feature at Wikimania and forgot to announce it outside that
audience. It's live now on Wikimedia websites. The feature is the
ability to control template inclusion by the use of <noinclude> and
<includeonly> tags.

Anything between <noinclude> and </noinclude> will be processed and
displayed only when the page is being viewed directly, not included.
Possible applications are:

* Categorising templates
* Interlanguage links to similar templates in other languages
* Explanatory text about how to use the template

The converse is <includeonly>. Text between <includeonly> and
</includeonly> will be processed and displayed only when the page is
being included. The obvious application is:

* Adding all pages containing a given template to a category

Note that the usual update problems apply -- if you change the
categories inside a template, the categories of the referring pages
won't be updated until those pages are edited.

Beware of bugs: this hasn't been tested in a real wiki environment yet.

-- Tim Starling

upssdr

unread,
Oct 24, 2005, 10:20:09 AM10/24/05
to zh.wikipedia
[[m:Help:Template#Noinclude_and_includeonly]]

super1

unread,
Oct 25, 2005, 12:58:05 AM10/25/05
to zh.wikipedia
我用过这个标签给模版分类,还是很方便的,当其他的页面引用模版的时候,并不会包括标签内的分类信息,现在我上不了wiki,不知道includeonly该怎么用呢,试着用过。但是看不出来有什么用,说起来,中文的高阶编辑帮助还真是缺乏,有时间大家一起整理下吧,起码不会和元wiki差太远就好
Reply all
Reply to author
Forward
0 new messages