Template:News/doc
This page is a template. It contains some standardized, often used text, which can be transcluded inside other pages. As this template is widely used in our wiki, it may be protected in which case only staff members can change it. Use the discussion page to propose enhancements or fixes, or to voice your opinion.
Use this template for a news item.
Parameters
Use this template for a news item.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Id | id | Add link text (HTML id attribute). Note: This can conflict with other ids on the page, so make it unique if possible. Using a unique date string such as YYYY-MM-DD for each news item as it is added to the main page should work fine. Use ISO 8601 date formatting whenever possible. If a second news item is generated in one day, append an integter number on the end of the field such as YYYY-MM-DD-2 | String | optional |
Date | date | A date string to display literally in the news.
| String | required |
Archivelink | archivelink | Add a small link to the wiki history page to the bottom of the news item. Be aware that special characters for templates include = and |, so they will need to be escaped with {{=}} or {{!}} respectively if used in the header. | Boolean | optional |
Header | header | Add the heading. Be aware that special characters for templates include = and |, so they will need to be escaped with {{=}} or {{!}} respectively if used within the header. | Unbalanced wikitext | required |
Body | body | Add the news text body. Be aware that special characters for templates include = and |, so they will need to be escaped with {{=}} or {{!}} respectively if used in the header. | Unbalanced wikitext | required |
Usage
See the template's testcases:
Parameter: date, header, body | |
---|---|
Wiki code | {{News|date=Aug 2, 2012|header=A header|body=
This is a news item.
}}
|
Main version | Aug 2, 2012: A headingThis is a news item.
|
Sandbox version | Aug 2, 2012: A headingThis is a news item. |
Parameter: id, date, header, body | |
---|---|
Wiki code | {{News|id=2012-08-02|date=Aug 2, 2012|header=A header|body=
This is a news item with an id attribute for linking. [[#2012-08-02|#2012-08-02]] can be used on the end of a link to page to reference this news item.
}}
|
Main version | Aug 2, 2012: A headingThis is a news item with an id attribute for linking. #2012-08-02 can be used on the end of a link to page to reference this news item.
|
Sandbox version | Aug 2, 2012: A headingThis is a news item with an id attribute for linking. #2012-08-02 can be used on the end of a link to page to reference this news item. |
Parameter: id, archivelink, date, header, body | |
---|---|
Wiki code | {{News|id=2012-08-02|archivelink=true|date=Aug 2, 2012|header=A header|body=
This is a news item with an id attribute for linking. [[#2012-08-02|#2012-08-02]] can be used on the end of a link to page to reference this news item.
}}
|
Main version | Aug 2, 2012: A headingThis is a news item with an id attribute for linking. #2012-08-02 can be used on the end of a link to page to reference this news item.
|
Sandbox version | Aug 2, 2012: A headingThis is a news item with an id attribute for linking. #2012-08-02 can be used on the end of a link to page to reference this news item.
|