close
Sayahna Sayahna
Search

Difference between revisions of "Template:Header"


(Created page with "<!-- make sure no parameters are removed --><includeonly>{{#switch:undef! |{{{title|undef!}}} |{{{genre|undef!}}} |{{{author|undef!}}} |{{{section|undef!}}} |{{{previous|...")
 
 
Line 1: Line 1:
<!-- make sure no parameters are removed --><includeonly>{{#switch:undef!
+
<!--
 +
 
 +
Begin headertemplate wrapper
 +
 
 +
--><div id="headertemplate" class="headerRaw ws-noexport"><!--
 +
 
 +
Make sure no parameters are removed
 +
 
 +
--><includeonly>
 +
{{#switch:undef!
 
  |{{{title|undef!}}}
 
  |{{{title|undef!}}}
|{{{genre|undef!}}}
 
 
  |{{{author|undef!}}}
 
  |{{{author|undef!}}}
 
  |{{{section|undef!}}}
 
  |{{{section|undef!}}}
 
  |{{{previous|undef!}}}
 
  |{{{previous|undef!}}}
 
  |{{{next|undef!}}}
 
  |{{{next|undef!}}}
  |{{{notes|undef!}}} = <div style="text-align:center; border:1px solid #CCC; font-size:0.9em;">'''template error: please do not remove empty parameters (see the [[WS:STYLE#Templates|style guide]] and [[Template:Header#documentation|template documentation]]).'''</div> [[Category:Headers missing parameters]]}}</includeonly>
+
  |{{{notes|undef!}}} = <div style="margin-right:auto; margin-left:auto; border-top:1px solid #CCC; border-right:1px solid #CCC; border-bottom:1px solid #hidden; border-left:1px solid #CCC; text-align:center;"><span class="error" style="font-size:90%; font-weight:bold;">template error: please do not remove empty parameters (see the [[WS:STYLE#Templates|style guide]] and [[Template:Header#documentation|template documentation]]).</span></div>{{#ifeq:{{NAMESPACE}}||[[Category:Headers missing parameters]]|}}}}</includeonly><!--
<!-- prettyurl-->
+
 
{{#if:{{{prettyurl|}}}|{{prettyurl|{{{prettyurl}}}}}}}
+
 
{| class="headertemplate" id="headertemplate"
+
Begin navigation header-->
|-
+
{| class="headertemplate" style="border-collapse:collapse; empty-cells:hide;"
|class="header_backlink" | {{#if:{{{previous|}}}|<span id="headerprevious">←{{{previous}}}</span>}}
+
|-<!--
|class="header_title"    | '''<span id="header_title_text">{{{title|പേരില്ലാത്ത രചന}}}</span>''' {{#if:{{{genre|}}}|<span id=''header_genre_text''>({{{genre}}})</span>}} {{#if:{{{override_author|}}}|<br /><i><span id="header_author_text">{{{override_author}}}</span></i>|{{#if:{{{author}}}|{{#if:{{{section|}}}| |<br/>}}രചന:<i>{{#ifeq:{{#expr:{{{author}}}}}|<strong class="error">Expression error: Unrecognised punctuation character "["</strong>|{{{author}}}</i>|{{#ifeq:{{lc:{{{override_author|{{{author|}}}}}}}}|unknown|<span id="header_author_text">അജ്ഞാതകര്‍ത്തൃകം</span>|[[രചയിതാവ്:{{{author}}}|<span id="header_author_text">{{{author}}}</span>]]}}}}</i>}}}}{{#if:{{{year|}}}|<span style="color:#999999"> ({{{year}}})</span>}}{{#if:{{{override_translator|{{{translator|}}}}}}|{{#switch:{{lc:{{{override_translator|{{{translator|}}}}}}}}
+
 
| ? =&nbsp;([[:Category:Deletion requests/Unknown translators|unknown translator]])
+
Previous page link-->
| unknown =, ''unknown translator''
+
|class="gen_header_backlink" | {{#if:{{{previous|}}}|<span id="headerprevious">←{{{previous}}}</span>}}<!--
| not mentioned =, ''translator not mentioned''
+
 
| wikisource =<i>, translated by [[Wikisource:Translations|<span id="header_translator_text">Wikisource</span>]]</i>{{#ifeq:{{BASEPAGENAME}}|{{PAGENAME}}|[[Category:Wikisource translations]]}}
+
Title-->
|<i>, translated by {{{override_translator|{{#ifeq:{{#expr:{{{translator}}}}}|<strong class="error">Expression error: Unrecognised punctuation character "["</strong>|{{{translator}}}</i>|[[Author:{{{translator}}}|<span id="header_translator_text">{{{translator}}}</span>]]</i>}}}}}
+
|class="gen_header_title"    | '''<span id="header_title_text">{{{title|Untitled}}}</span>''' {{#if:{{{year|}}}{{{override_year|}}}|{{#if:{{{noyear|}}}|[[Category:Pages with noyear]]|&nbsp;({{{override_year|{{#ifeq:{{{year}}}|?|unknown|{{{year}}}}}}}})&nbsp;}}}}<!--
}}}}{{#if:{{{section|}}}|<br /><span id="header_section_text">{{{section|}}}</span>}}
+
 
|class="header_forelink" | {{#if:{{{next|}}}|<span id="headernext">{{{next}}}→</span>}}
+
Author field
|}
+
-->{{#if:{{{override_author|}}}|<!--
{| class="header_notes"
+
 
 +
    Override author
 +
    --><br /><i><span id="header_author_text" class="vcard"><span class="fn">{{{override_author}}}</span></span></i>|<!--
 +
 
 +
    Normal author
 +
    -->{{#if:{{{author}}}|<!--
 +
 
 +
        Insert a line break if page is *not* a section page
 +
        -->{{#if:{{{section|}}}| |<br/>}}<!--
 +
        --><i>by <!--
 +
 
 +
        Catch unknown authors
 +
        -->{{#ifeq:{{lc:{{{override_author|{{{author|}}}}}}}}|unknown|<span id="header_author_text">Unknown</span>|<!--
 +
 
 +
            Link known authors to the author namespace
 +
            -->{{#ifexist: Author:{{{author}}} | | [[Category:Works with non-existent author pages]] }} [[Author:{{{author}}}|<span id="header_author_text" class="vcard"><span class="fn">{{{author}}}</span></span>]]}}</i>}}}}<!--
 +
 
 +
Editor field - only if needed
 +
-->{{#if:{{{override_editor|}}}{{{editor|}}}|<!--
 +
 
 +
    Catch special cases for editors
 +
    -->{{#switch:{{lc:{{{override_editor|{{{editor|}}}}}}}}<!--
 +
   
 +
        -->| ? | unknown=, ''editor unknown''[[Category:Works with unknown editors]]<!--
 +
        -->| not mentioned =, ''editor not mentioned''[[Category:Works with unmentioned editors]]<!--
 +
 
 +
        Switch default - the given editor
 +
        -->|#default=<i>{{#if:{{{author|}}}{{{override_author|}}}|,&#32;}}<!--
 +
       
 +
          -->{{#if:{{{author|}}}{{{override_author|}}}||{{#if:{{{section|}}}||<br>}}}} edited by <!--
 +
 
 +
          --><span id="header_editor_text" class="vcard"><!--
 +
          --><span class="fn">{{#if:{{{override_editor|}}}|{{{override_editor}}}|[[Author:{{{editor}}}|{{{editor}}}]]}}</span></span><!--
 +
    --></i>}}<!--
 +
-->}}<!--
 +
 
 +
Translator field - only if needed
 +
-->{{#if:{{{override_translator|{{{translator|}}}}}}|<!--
 +
 
 +
    Catch special cases for translators
 +
    -->{{#switch:{{lc:{{{override_translator|{{{translator|}}}}}}}}<!--
 +
        -->| ? =&nbsp;([[:Category:Deletion requests/Unknown translators|unknown translator]])<!--
 +
        -->| unknown =, ''unknown translator''<!--
 +
        -->| not mentioned =, ''translator not mentioned''<!--
 +
        -->| wikisource =<i>, translated by [[Wikisource:Translations|<span id="header_translator_text">Wikisource</span>]]</i><!--
 +
 
 +
        If it is the base page, add to the "Wikisource translation" category
 +
        -->{{#ifeq:{{BASEPAGENAME}}|{{PAGENAME}}|[[Category:Wikisource translations]]}}<!--
 +
 
 +
        Switch default - the given translator
 +
        -->|<i>, translated by <!--
 +
 
 +
          Override translator if needed
 +
          -->{{{override_translator|<!--
 +
 
 +
              -->[[Author:{{{translator}}}|<!--
 +
              --><span id="header_translator_text" class="vcard"><span class="fn">{{{translator}}}</span></span>]]</i>}}}
 +
}}}}<!--
 +
 
 +
Section field
 +
-->{{#if:{{{section|}}}|<br /><span id="header_section_text">{{{section|}}}</span><!--
 +
 
 +
    Section author
 +
    -->{{#if:{{{override_contributor|}}}{{{contributor|}}}|<!--
 +
        --><i> by <span id="header_contributor_text" class="vcard"><!--
 +
        --><span class="fn">{{#if:{{{override_contributor|}}}|{{{override_contributor}}}|[[Author:{{{contributor}}}|{{{contributor}}}]]}}</span><!--
 +
    --></i>}}<!--
 +
 
 +
end of section field
 +
-->}}<!--
 +
 
 +
Forelink -->
 +
|class="gen_header_forelink" | {{#if:{{{next|}}}|<span id="headernext">{{{next}}}→</span>}}
 +
|}<!--
 +
 
 +
 
 +
Notes section-->
 +
{| class="header_notes" style="border-collapse:collapse;"
 
|-
 
|-
 
|<!--
 
|<!--
  Sister project links
 
  -->{{Plain sister
 
      | wikipedia  = {{{wikipedia|}}}
 
      | commons    = {{{commons|}}}
 
      | commonscat  = {{{commonscat|}}}
 
      | wikiquote  = {{{wikiquote|}}}
 
      | wikinews    = {{{wikinews|}}}
 
      | wiktionary  = {{{wiktionary|}}}
 
      | wikibooks  = {{{wikibooks|}}}
 
      | wikiversity = {{{wikiversity|}}}
 
      | wikispecies = {{{wikispecies|}}}
 
      | meta        = {{{meta|}}}
 
      }}
 
<!-- Shortcut link-->
 
{{#if:{{{shortcut|}}}|{{shortcut|{{{shortcut}}}}}}}
 
<!--Notes from parameter-->
 
{{{notes}}}
 
|}
 
----
 
  
<includeonly><!--
+
  Sister project links (only #if we need them)
unknown translator -->{{#switch:{{{translator}}}
+
  -->{{#if:<!--
 +
-->{{{disambiguation|}}}<!--
 +
-->{{{edition|}}}<!--
 +
-->{{{portal|}}}<!--
 +
-->{{{related_author|}}}<!--
 +
-->{{{wikipedia|}}}<!--
 +
-->{{{commons|}}}<!--
 +
-->{{{commonscat|}}}<!--
 +
-->{{{wikiquote|}}}<!--
 +
-->{{{wikinews|}}}<!--
 +
-->{{{wiktionary|}}}<!--
 +
-->{{{wikibooks|}}}<!--
 +
-->{{{wikilivres|}}}<!--
 +
-->{{{wikidata|}}}<!--
 +
-->{{{wikivoyage|}}}<!--
 +
-->{{{wikiversity|}}}<!--
 +
-->{{{wikispecies|}}}<!--
 +
-->{{{meta|}}}<!--
 +
 
 +
    -->|<!--
 +
 
 +
    -->{{Plain sister<!--
 +
-->| disambiguation = {{{disambiguation|}}}<!--
 +
-->| edition = {{{edition|}}}<!--
 +
-->| portal = {{{portal|}}}<!--
 +
-->| related_author = {{{related_author|}}}<!--
 +
-->| wikipedia = {{{wikipedia|}}}<!--
 +
-->| commons = {{{commons|}}}<!--
 +
-->| commonscat = {{{commonscat|}}}<!--
 +
-->| wikiquote = {{{wikiquote|}}}<!--
 +
-->| wikinews = {{{wikinews|}}}<!--
 +
-->| wiktionary = {{{wiktionary|}}}<!--
 +
-->| wikibooks = {{{wikibooks|}}}<!--
 +
-->| wikilivres = {{{wikilivres|}}}<!--
 +
-->| wikidata = {{{wikidata|}}}<!--
 +
-->| wikivoyage = {{{wikivoyage|}}}<!--
 +
-->| wikiversity = {{{wikiversity|}}}<!--
 +
-->| wikispecies = {{{wikispecies|}}}<!--
 +
-->| meta = {{{meta|}}}<!--
 +
    -->}}<!--
 +
  end #if we need plain sister project links
 +
  -->}}<!--
 +
 
 +
  Shortcut link
 +
  -->{{#if:{{{shortcut|}}}|{{Shortcut|{{{shortcut}}}}}}}<!--
 +
 
 +
  Notes from parameter
 +
  -->{{{notes}}}
 +
|}</div><includeonly><!--
 +
 
 +
Unknown translator
 +
-->{{#switch:{{{translator}}}
 
  |?
 
  |?
 
  |unknown = {{No translator info}}
 
  |unknown = {{No translator info}}
 
}}<!--
 
}}<!--
subpages -->{{#ifeq:{{BASEPAGENAME}}|{{PAGENAME}}||{{#switch:1
+
 
 +
Subpages -->{{#ifeq:{{BASEPAGENAME}}|{{PAGENAME}}||{{#switch:1
 
  |{{#ifexist:{{#rel2abs:../}}|1}}
 
  |{{#ifexist:{{#rel2abs:../}}|1}}
 
  |{{#ifexist:{{#rel2abs:../../}}|1}}
 
  |{{#ifexist:{{#rel2abs:../../}}|1}}
  |{{#ifexist:{{#rel2abs:../../../}}|1}} = [[Category:{{#if:{{NAMESPACE}}|{{NAMESPACE}} subpages|ഉപതാളുകള്‍}}]]
+
  |{{#ifexist:{{#rel2abs:../../../}}|1}} = [[Category:{{#if:{{NAMESPACE}}|{{NAMESPACE}} subpages|Subpages}}]]
}}}}<!--track pages using the author override-->{{#if:{{{override_author|}}}|[[വര്‍ഗ്ഗം:ഒന്നില്‍ കൂടുതല്‍ കര്‍ത്താക്കള്‍ ഉള്ള കൃതി]]}}
+
}}}}<!--
<!--track pages using the dirty link-detection hacks -->{{#switch:<strong class="error">Expression error: Unrecognised punctuation character "["</strong>
+
Categories
|{{#expr:{{{author}}}}}
+
  -->{{#if:{{#titleparts:{{{categories|}}}|1|1}}|[[Category:{{#titleparts:{{{categories}}}|1|1}}]]}}<!--
|{{#expr:{{{translator}}}}} = [[Category:pages using the author field hack]]
+
  -->{{#if:{{#titleparts:{{{categories|}}}|1|2}}|[[Category:{{#titleparts:{{{categories}}}|1|2}}]]}}<!--
}}{{#ifeq:{{lc:{{{override_author|{{{author|}}}}}}}}|unknown|[[Category:അജ്ഞാതകര്‍ത്തൃകങ്ങള്‍]]}}
+
  -->{{#if:{{#titleparts:{{{categories|}}}|1|3}}|[[Category:{{#titleparts:{{{categories}}}|1|3}}]]}}<!--
{{#if:{{{year|}}}|[[Category:{{{year}}}-ലെ കൃതികള്‍]]}}
+
  -->{{#if:{{#titleparts:{{{categories|}}}|1|4}}|[[Category:{{#titleparts:{{{categories}}}|1|4}}]]}}<!--
{{#if:{{{noyear|}}}|[[Category:വര്‍ഷം ലഭ്യമല്ലാത്ത കൃതികള്‍]]|}}
+
  -->{{#if:{{#titleparts:{{{categories|}}}|1|5}}|[[Category:{{#titleparts:{{{categories}}}|1|5}}]]}}<!--
<!-- {|style="clear:bottom; width:100%; background-color: #E0F0E6; border:1px solid #ACE1AF; margin-top:-.8em; margin-bottom:-.7em"
+
  -->{{#if:{{#titleparts:{{{categories|}}}|1|6}}|[[Category:{{#titleparts:{{{categories}}}|1|6}}]]}}<!--
|style="font-size:95%; text-align:left; float:bottom; white-space: nowrap;color:#000"|
+
  -->{{#if:{{#titleparts:{{{categories|}}}|1|7}}|[[Category:{{#titleparts:{{{categories}}}|1|7}}]]}}<!--
|class="header_backlink" | {{#if:{{{previous|}}}|<span id="headerprevious">{{{previous}}}</span>}}
+
  -->{{#if:{{#titleparts:{{{categories|}}}|1|8}}|[[Category:{{#titleparts:{{{categories}}}|1|8}}]]}}<!--
|'''<span id="header_title_text">{{{title|Untitled}}}</span>'''
+
  -->{{#if:{{#titleparts:{{{categories|}}}|1|9}}|[[Category:{{#titleparts:{{{categories}}}|1|9}}]]}}<!--
|class="header_forelink" | {{#if:{{{next|}}}|<span id="headernext">{{{next}}}</span>}}
+
  -->{{#if:{{#titleparts:{{{categories|}}}|1|10}}|[[Category:{{#titleparts:{{{categories}}}|1|10}}]]}}<!--
|}
+
 
-->
+
Track pages using the author override
</includeonly><noinclude>
+
-->{{#if:{{{override_author|}}}|[[Category:Pages with override author]]}}<!--
[[Category:Exclude in print]]
+
 
{{വിവരണം|Template:Header/doc}}
+
Track pages with no author given
 +
-->{{#ifeq:{{lc:{{{override_author|{{{author|}}}}}}}}|unknown|[[Category:Anonymous texts]]}}<!--
 +
 
 +
Track pages using shortcuts
 +
-->{{#if:{{{shortcut|}}}|[[Category:Mainspace pages with shortcuts]]}}<!--
 +
 
 +
Categorise page by year, track pages with no year (only if not a subpage or disambiguation page)
 +
-->{{#ifeq:{{BASEPAGENAME}}|{{PAGENAME}}|{{#ifeq:{{{disambiguation|}}}|yes||{{#if:{{{override_year|}}}{{{noyearcat|}}}|{{#if:{{{override_year|}}}|[[Category:Pages with override year]]}}{{#if:{{{noyearcat|}}}|[[Category:Pages with noyearcat]]}}|{{Header/year|{{{year|}}}}}}}}}}}<!--
 +
 
 +
Protection level detection and automatic icon
 +
-->{{#if:{{NAMESPACE}}
 +
    |<!-- no effect outside the main namespace -->
 +
    |{{#if:{{PROTECTIONLEVEL:edit}}{{PROTECTIONLEVEL:move}}<!-- if page protected -->
 +
        |{{locked}}<!-- call the locked (top icon) template -->
 +
      }}
 +
  }}<!--
 +
 
 +
END OF VISIBLE TEMPLATE
 +
 
 +
 
 +
MICROFORMAT DATA-->
 +
<div id="ws-data" class="ws-noexport" style="display:none; speak:none;">
 +
<span id="ws-title">{{{title|}}}{{#if:{{{section|}}}|&#32;— ''{{{section}}}''}}</span>
 +
{{#if:{{{author|}}}{{{override_author|}}}|<span id="ws-author">{{#if:{{{override_author|}}}|{{{override_author}}}|{{{author}}}}}</span>|}}
 +
{{#if:{{{translator|}}}{{{override_translator|}}}|<span id="ws-translator">{{#if:{{{override_translator|}}}|{{{override_translator}}}|{{{translator}}}}}</span>|}}
 +
{{#if:{{{year|}}}{{{override_year|}}}|<span id="ws-year">{{#if:{{{override_year|}}}|{{{override_year}}}|{{{year}}}}}</span>|}}
 +
</div><!--
  
[[ca:Plantilla:Encapçalament]]
+
END OF TEMPLATE
[[cs:Šablona:NavigacePaP]]
+
--></includeonly><noinclude>
[[da:Skabelon:Header]]
+
{{documentation|Template:Header/doc}}
[[el:Πρότυπο:Τίτλος]]
+
</noinclude>
[[en:Template:Header]]
 
[[es:Plantilla:Encabezado]]
 
[[et:Mall:Päis]]
 
[[fa:الگو:سرصفحه]]
 
[[fi:Malline:Otsikko]]
 
[[fr:Modèle:Titre]]
 
[[hr:Predložak:Niz]]
 
[[hu:Sablon:Fej]]
 
[[la:Formula:Titulus2]]
 
[[no:Mal:Topp]]
 
[[pt:Predefinição:Navegar]]
 
[[ro:Format:Titlu]]
 
[[ru:Шаблон:Заголовок]]
 
[[sl:Predloga:Naslov]]
 
[[sv:Mall:Titel]]
 
[[uk:Шаблон:Заголовок]]
 
[[zh:Template:Header]]
 

Latest revision as of 14:16, 28 May 2013

Untitled
by [[Author:{{{author}}}|{{{author}}}]]
{{{notes}}}
Documentation icon Template documentation[create]