Vorlage:ThisWay: Unterschied zwischen den Versionen

Zur Navigation springen Zur Suche springen
(70 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
<!--------------
+
<!--
  
 
VARIABLE
 
VARIABLE
  
 +
-->{{#vardefine: defaultlink
 +
| {{#ifeq: {{NAMESPACENUMBER}}| 0
 +
| {{BASEPAGENAME}}
 +
| {{NAMESPACE}}:{{BASEPAGENAME}}
 +
}} }}<!--
 
-->{{#vardefine: link  
 
-->{{#vardefine: link  
| {{{1|{{#ifeq: {{NAMESPACENUMBER}}| 0
+
| {{#if: {{{1|}}} | {{{1|}}} | {{#var:defaultlink}} }}  
| {{BASEPAGENAME}}  
 
| {{NAMESPACE}}:{{BASEPAGENAME}} }} }}}  
 
 
}}<!--
 
}}<!--
 +
-->{{#vardefine: link_markup
 +
| {{#if: {{{1|}}}
 +
| [[{{{1|}}}|<span>Weiter zu:</span> {{#show: {{{1|}}}|?hat_titel}} &nbsp;{{#fas:angle-double-right}}]]
 +
| [[{{#var:link}}|{{#fas:angle-double-left}} <span>Zurück zu:</span> {{#show: {{#var:link}}|?hat_titel}}]]
 +
}} }}<!--
 
-->{{#vardefine: class
 
-->{{#vardefine: class
| {{#if: {{{1|}}}||class=zurueck}} }}<!--
+
| {{#if: {{{1|}}}| title='zum nächsten Thema' class='textbox_body'
-------------------------
+
| class='zurueck textbox_body' title='zurück zum Hauptartikel'}} }}<!--  
        NAVIGATION
+
-->{{#vardefine: shorttitle
-------------------------
+
| {{#titleparts:{{PAGENAME}}| | -1}}  
-->{{#vardefine: navigation
 
| {{Metalog:Sitemap}}
 
 
}}<!--
 
}}<!--
  
 
SCHREIBEN
 
SCHREIBEN
  
--><div {{#var:class}} id=thisway><!--
+
-->{{#if: {{{noway|}}} |<!-- do nothing-->
-->{{#if: {{{1|}}}
+
|<div {{#var:class}} id=thisway>{{#var:link_markup}}</div>
|{{{2|{{{Weiter|Weiter}}} }}} zu}} [[{{#var:link}}]] {{#if: {{{1|}}}|| (zurück zum Hauptartikel)
+
}}<!--  
}}
+
 
</div>
+
--><includeonly>{{#css:
{{#if: {{{nocat|}}} | <!-- do nothing -->
+
#siteNotice .crumbs {
| {{#if: {{{1|}}} | [[Kategorie:Hauptartikel]] | [[Kategorie:Sidepage]]}}
+
    display: none;
 +
}
 
}}<!--
 
}}<!--
--><div id="nv"><div id="nv_content">
 
<div id="chapters">
 
{{#var: navigation}}
 
</div>
 
</div></div><!--
 
  
TAGLINE
+
KATEGORIEN und Attribute
  
-->{{#vardefine: v1 | {{#titleparts: {{FULLPAGENAME}} |1 |1}} }}<!--
+
-->{{#if: {{{nocat|}}} | <!-- do nothing -->
-->{{#vardefine: v2 | {{#titleparts: {{FULLPAGENAME}} |1 |2}} }}<!--
+
| [[Kategorie:Artikel]] <!--
-->{{#vardefine: v3 | {{#titleparts: {{FULLPAGENAME}} |1 |3}} }}<!--
+
-->{{#if: {{{1|}}}
 +
  | {{#set: thisway links to={{#var:link}}
 +
    | written_by={{#if: {{{autor|}}}| {{{autor|}}} | Bernhard Scheid}}
 +
    }}
 +
  }}<!--
 +
-->{{#set:  
 +
    {{#switch: {{NAMESPACENUMBER}}  
 +
    | 0= is_mainspace_article
 +
    | 4= is_metalog_article
 +
    | 12= is help article
 +
    }}={{#var:shorttitle}}
 +
  }}  
 +
}}</includeonly>
 +
<noinclude>
 +
=== Code ===
  
Schreiben
+
<pre>
 +
{{ThisWay
 +
 +
| nocat= 
 +
| noway= 
 +
| autor=  <!-- nicht BS -->
 +
}} </pre>
  
--><div id=siteSub2> [[Religion-in-Japan]] <!--
+
<templatedata>
-->{{#if: {{NAMESPACE}} |  > {{NAMESPACE}} }} <!--
+
{
--> > [[{{#var: v1}}|{{ROOTPAGENAME}}]] <!--
+
"params": {
-->{{#if: {{#var: v2}}
+
"1": {
| > [[{{#var: v1}}/{{#var: v2}}|{{#var: v2}}]]
+
"description": "link adresse",
}} <!--
+
"type": "string",
-->{{#if: {{#var: v3}}  
+
"autovalue": "Parent-Pagename"
| > [[{{#var: v1}}/{{#var: v2}}/{{#var: v3}}|{{#var: v3}}]]
+
},
}}
+
"noway": {
</div><!--
+
"description": "keinen Link anzeigen",
-->{{#css:
+
"type": "boolean",
#nv,  
+
"autovalue": "0"
#nv.absolute {
+
},
position: absolute;
+
"nocat": {
left: 0;
+
"label": "no category",
top: 185px;
+
"description": "keine Kategorie hinzufügen",
right: 0;
+
"type": "boolean",
font-size: 1rem;
+
"autovalue": "0"
z-index: 4;
+
},
}
+
"autor": {
#nv.fixed {
+
"description": "Gastautor",
position: fixed; 
+
"type": "string"
left: 100px;
+
}
right: 100px;
+
},
top: 1.5em;
+
"description": "Fügt Weiter-zu Links am Ende des Artikels ein.",
}
+
"format": "block"
.mobile #nv {
 
position: absolute;
 
top: -4px; 
 
}
 
#nv.fixed #nv_content {
 
    margin: auto;
 
    max-width: 78em;
 
    position: relative;
 
}
 
#chapters {
 
    position: absolute;
 
    width: 12.5em;
 
    left: -6.25em;
 
}
 
.mobile #chapters {
 
    left: 0px;
 
}
 
div#simpleSearch {
 
width:auto;
 
margin:0;
 
  border-color: #ccc;
 
  border-radius: 3px;
 
font-size: 1em;
 
}
 
div#simpleSearch #searchInput {
 
font-size: .8em;
 
 
}
 
}
}}<noinclude>
+
</templatedata>
Parameter: 1 = "Link", 2 = "... zu", nocat (keine Kategorie)
 
 
</noinclude>
 
</noinclude>

Version vom 4. April 2022, 21:27 Uhr

Code

{{ThisWay 
|  
| nocat=  
| noway=  
| autor=  <!-- nicht BS -->
}} 

Fügt Weiter-zu Links am Ende des Artikels ein.

Vorlagenparameter

Diese Vorlage bevorzugt Blockformatierung von Parametern.

ParameterBeschreibungTypStatus
11

link adresse

Autowert
Parent-Pagename
Zeichenfolgeoptional
Nowaynoway

keinen Link anzeigen

Autowert
0
Booleschoptional
no categorynocat

keine Kategorie hinzufügen

Autowert
0
Booleschoptional
Autorautor

Gastautor

Zeichenfolgeoptional