滿意工廠模板:Doc

出自華麥百科
於 2024年10月18日 (五) 12:18 由 Chunghwamc留言 | 貢獻 所做的修訂 (建立內容為「{{ambox | icon = Icon-warning-red.svg | border = red | type = Deprecated | info = This template is deprecated in favour of {{T|Documentation}}, which doesn't rely on unbalanced templates. }} {{doc/start|clear}} To use, create a sub-page from the template called '''doc''', put {{tl|doc/start}} at the start of your documentation, and {{tl|doc/end}} at the end. Go back to your main template page and put <noinclude>{{tl|doc}}</noinclude> on a newlin…」的新頁面)
(差異) ←上個修訂 | 最新修訂 (差異) | 下個修訂→ (差異)

模板:Ambox 模板:Doc/start To use, create a sub-page from the template called doc, put 模板:Tl at the start of your documentation, and 模板:Tl at the end.

Go back to your main template page and put <noinclude>模板:Tl</noinclude> on a newline after the end of the template. /doc pages will automatically be added to Category:Template documentation.

Optional parameters[編輯原始碼]

clear[編輯原始碼]

If your main template page has floating content and you would like to stop it going over the documentation, put 模板:Tlx instead of 模板:Tl on your documentation page.
This is also useful for templates not using <includeonly>, as it will put some space between the template and the documentation box.

nodoc=1[編輯原始碼]

If a template has no documentation and you don't know how to use it, put 模板:Tlx (or if the template needs clear as well, 模板:Tlx) instead of 模板:Tl on your documentation page.
The documentation's background will become red to make it more noticeable, and the page will be added to Category:Templates with no documentation.

baddoc=1[編輯原始碼]

Similar to nodoc, this is used to mark templates that do have documentation, but it isn't very good. This can mean it doesn't have enough examples, doesn't explain all the functions properly, or doesn't explain the point of the template properly.
The documentation's background will become yellow to make it more noticeable, and the page will be added to Category:Templates with bad documentation.

If both nodoc and baddoc are specified, baddoc will be ignored.