Difference between revisions of "Template:Software/NewsHeader"

From SoftMC-Wiki
Jump to: navigation, search
(added more examples)
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>== {{{1}}} ==
+
<includeonly>;{{{1}}}
{| width=100% border=1 cellspacing=0 cellpadding=3  
+
<table width="100%" border="1" cellspacing="0" cellpadding="3">
!width=90 | '''Date'''<!--
+
<tr>
-->{{#if:{{{3|}}}|<br/>
+
<th width="90">Date</th>
!{{{3}}}}}<!--
+
{{#if:{{{addHeaders|}}}|{{{addHeaders}}}}}
-->{{#if:{{{4|}}}|<br/>
+
<th>Description</th>
!{{{4}}}}}
+
<th width="250">Link</th>
!Description
+
</tr>
!width=250 | Link
 
 
{{{2}}}
 
{{{2}}}
|}</includeonly><!--  
+
</table></includeonly><!--  
  
  
Line 20: Line 19:
 
|template=
 
|template=
 
<nowiki>
 
<nowiki>
{{Software/NewsHeader|month|
+
{{Software/NewsHeader|month|addHeaders=|
 
contents
 
contents
 
}}
 
}}
Line 30: Line 29:
 
;contents
 
;contents
 
: News entries, which require the [[Template:Software/News|<nowiki>{{Software/News}}</nowiki>]] template.
 
: News entries, which require the [[Template:Software/News|<nowiki>{{Software/News}}</nowiki>]] template.
 +
;addHeaders (optional)
 +
: Additional Headers, that will appear between ''Date'' and ''Description''.
 +
: The headers must be in the XHTML table style. For Example: <code><nowiki><th width="200">Header</th></nowiki></code>.
  
 
|operation=
 
|operation=
 
|examples=
 
|examples=
 +
== Simple ==
 +
A simple example, with only the basic table headers ''Date'', ''Description'' and ''Link'':
 +
;Input
 
<pre>
 
<pre>
 
{{Software/NewsHeader|October 2010|
 
{{Software/NewsHeader|October 2010|
Line 39: Line 44:
 
}}
 
}}
 
</pre>
 
</pre>
 +
;Output
 +
{{Software/NewsHeader|October 2010|
 +
{{Software/News|2010-10-04|aico.control 1.5.0 released|[[/1.5.0|aico.control 1.5.0 release page]]}}
 +
{{Software/News|2010-10-12|next news topic|[[link]]}}
 +
}}
 +
 +
== Advanced ==
 +
Example, which uses the additional table header ''Version'':
 +
;Input
 +
<pre>
 +
{{Software/NewsHeader|October 2010|addHeaders=<th width="150">Version</th>|
 +
{{Software/News|2010-10-04|1.5.0|aico.control 1.5.0 released|[[/1.5.0|aico.control 1.5.0 release page]]}}
 +
{{Software/News|2010-10-12|-|next news topic|[[link]]}}
 +
}}
 +
</pre>
 +
;Output
 +
{{Software/NewsHeader|October 2010|addHeaders=<th width="150">Version</th>|
 +
{{Software/News|2010-10-04|1.5.0|aico.control 1.5.0 released|[[/1.5.0|aico.control 1.5.0 release page]]}}
 +
{{Software/News|2010-10-12|-|next news topic|[[link]]}}
 +
}}
 +
 
}}
 
}}
  
 
[[Category:Template:Software]]
 
[[Category:Template:Software]]
 
</noinclude>
 
</noinclude>

Latest revision as of 11:58, 23 November 2010

Header for a news block, used in software release pages.

Template

{{Software/NewsHeader|month|addHeaders=|
contents
}}

Parameters

month
The month and the year of the news block.
contents
News entries, which require the {{Software/News}} template.
addHeaders (optional)
Additional Headers, that will appear between Date and Description.
The headers must be in the XHTML table style. For Example: <th width="200">Header</th>.

Examples

Simple

A simple example, with only the basic table headers Date, Description and Link:

Input
{{Software/NewsHeader|October 2010|
{{Software/News|2010-10-04|aico.control 1.5.0 released|[[/1.5.0|aico.control 1.5.0 release page]]}}
{{Software/News|2010-10-12|next news topic|[[link]]}}
}}
Output
October 2010
Date Description Link
2010-10-04aico.control 1.5.0 releasedaico.control 1.5.0 release page
2010-10-12next news topiclink

Advanced

Example, which uses the additional table header Version:

Input
{{Software/NewsHeader|October 2010|addHeaders=<th width="150">Version</th>|
{{Software/News|2010-10-04|1.5.0|aico.control 1.5.0 released|[[/1.5.0|aico.control 1.5.0 release page]]}}
{{Software/News|2010-10-12|-|next news topic|[[link]]}}
}}
Output
October 2010
Date Version Description Link
2010-10-041.5.0aico.control 1.5.0 releasedaico.control 1.5.0 release page
2010-10-12-next news topiclink

For more examples refer to pages, which use this template: What links here.

Help:Templates describes general usage of templates, including treatment of special characters.