MediaWiki:Proofreadpage header template: Difference between revisions
Appearance
Forgottenman (talk | contribs) copy from WS |
Forgottenman (talk | contribs) m change to if |
||
| (26 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
<includeonly>{{ | <includeonly><div id="headertemplate"> | ||
| | <div class="{{#switch:{{{type}}} | ||
| | | journal = headertemplate-journal | ||
| | | headertemplate | ||
| | }}"> | ||
| | <div class="headertemplate-author">{{{author}}}</div> | ||
| | <div class="headertemplate-title">{{#switch:{{{type}}} | ||
| | | collection = {{{current|{{PAGENAME}}}}}{{#if:{{{collection}}}| — ''{{{collection}}}''}} | ||
| journal = {{{current|{{PAGENAME}}}}} | |||
| ''[[{{{title|{{PAGENAME}}}}} (text)|{{{title}}}]]'' {{#if:{{{article|}}} | ([[{{{article}}}|article]]) | ([[{{{title|{{PAGENAME}}}}}|article]]) }} | |||
}}</div><div class="headertemplate-reference">{{#if:{{{translator|}}}|Translator {{{translator}}}.<br/> | |||
}}{{#switch:{{{type}}} | |||
| collection = ''{{{title}}}'', {{#if:{{{editor|}}}|Edited by {{{editor}}}, |}}{{#if:{{{publisher}}}|{{{publisher}}}, |}}{{{year}}}{{#if:{{{from|}}}| (pp. {{{from}}}-{{{to}}})|}}. | |||
| journal = ''{{{title}}}'', {{{volume}}}, {{{year}}}{{#if:{{{from|}}}| (pp. {{{from}}}-{{{to}}})|}}. | |||
| {{#if:{{{publisher|}}}|{{#if:{{{address|}}}|{{{address}}}: |}}{{{publisher}}} {{#if:{{{year|}}}|({{{year}}}), |}}}}{{#if:{{{from|}}}|{{#ifeq:{{{from}}}|{{{to}}}|page {{{from}}}|pages {{{from}}}-{{{to}}} }} }}. | |||
}} | }} | ||
{{#ifeq:{{{value}}}|toc|{{{remarks}}}|}} | {{#if:{{{navigation|}}}|<div class="headertemplate-notes">'''Navigation''': {{{navigation}}}.</div>|}} | ||
</div> | |||
</div> | |||
</div> | |||
{{#ifeq:{{{type}}}|journal||{{#ifexpr:{{#if:{{{prev|}}}|1|0}} or {{#if:{{{next|}}}|1|0}}| | |||
<div class="footertemplate" > | |||
<table width="100%" cellpadding="0" cellspacing="0" style="padding-left:0px; padding-right:0px; background-color:transparent"> | |||
<tr> | |||
<td width="33%" style="text-align:left;">{{#if:{{{prev|}}}|<span id="headerprevious"><span style="color:#808080">◄ </span>{{{prev}}}</span> }}</td> | |||
<td width="34%" style="text-align:center;">{{#switch:{{{type}}}|collection=|{{{current|}}}}}</td> | |||
<td width="33%" style="text-align:right;">{{#if:{{{next|}}}|<span id="headernext">{{{next}}}<span style="color:#808080"> ►</span></span> }}</td> | |||
</tr> | |||
</table> | |||
</div> | |||
}}}} | |||
<br/> | |||
{{#ifeq:{{{value}}}|toc|{{{remarks}}} | |||
|}} | |||
</includeonly><noinclude> | </includeonly><noinclude> | ||
Latest revision as of 20:32, 15 March 2011
- This template generates headers for the <pages/> command, when it is called with "header=1".
- It takes its parameters from the index page.
- Parameters from the index page can be overridden in the "pages" command.
- Example:
<pages index="foo" header=1 author="bar" />