Vorlage:BrowseByAskQueryPreviousNext: Unterschied zwischen den Versionen

Aus Open Source Ecology - Germany
Zur Navigation springen Zur Suche springen
K
 
({{FULLPAGENAME}})
 
(Eine dazwischenliegende Version desselben Benutzers wird nicht angezeigt)
Zeile 2: Zeile 2:
 
   set the property page name, as it is necessary for querying before (<) and after (>) the current page
 
   set the property page name, as it is necessary for querying before (<) and after (>) the current page
 
-->{{#vardefine: propertyPageName|Seitenname}}<!--
 
-->{{#vardefine: propertyPageName|Seitenname}}<!--
-->[[{{#var: propertyPageName}}::{{PAGENAME}}| ]]<!--
+
-->[[{{#var: propertyPageName}}::{{FULLPAGENAME}}| ]]<!--
  
 
-->{{
 
-->{{
Zeile 11: Zeile 11:
 
   SAVE THE QUERY FOR BEFORE PAGE(S) AND AFTER PAGE(S)
 
   SAVE THE QUERY FOR BEFORE PAGE(S) AND AFTER PAGE(S)
 
   save:
 
   save:
     before [[Category:Literature]] [[PagenameProperty::<{{PAGENAME}}]] and
+
     before [[Category:Literature]] [[PagenameProperty::<{{FULLPAGENAME}}]] and
     after  [[Category:Literature]] [[PagenameProperty::>{{PAGENAME}}]]
+
     after  [[Category:Literature]] [[PagenameProperty::>{{FULLPAGENAME}}]]
 
-->{{#vardefine: querybefore|<!--
 
-->{{#vardefine: querybefore|<!--
   -->{{{1|{{{query|}}}}}} [[{{#var: propertyPageName}}::<{{{compare with|{{PAGENAME}} }}}]]<!--
+
   -->{{{1|{{{query|}}}}}} [[{{#var: propertyPageName}}::<{{{compare with|{{FULLPAGENAME}} }}}]]<!--
 
-->}}<!--
 
-->}}<!--
 
-->{{#vardefine: queryafter|<!--
 
-->{{#vardefine: queryafter|<!--
   -->{{{1|{{{query|}}}}}} [[{{#var: propertyPageName}}::>{{{compare with|{{PAGENAME}} }}}]]<!--
+
   -->{{{1|{{{query|}}}}}} [[{{#var: propertyPageName}}::>{{{compare with|{{FULLPAGENAME}} }}}]]<!--
 
-->}}<!--
 
-->}}<!--
  
Zeile 37: Zeile 37:
 
         -->{{#ifexpr: {{#ask: {{#var: querybefore}} |format = count }} < 2<!--
 
         -->{{#ifexpr: {{#ask: {{#var: querybefore}} |format = count }} < 2<!--
 
           then -->|<!--
 
           then -->|<!--
             situation {{PAGENAME}} is the very first page: get the last one
+
             situation {{FULLPAGENAME}} is the very first page: get the last one
 
           -->{{#ask: {{#var: queryafter}}  |order=desc | searchlabel=|link=none|limit=1|sort={{#var: propertyPageName}} }}<!--
 
           -->{{#ask: {{#var: queryafter}}  |order=desc | searchlabel=|link=none|limit=1|sort={{#var: propertyPageName}} }}<!--
 
           else -->|<!--
 
           else -->|<!--
Zeile 52: Zeile 52:
 
         -->{{#ifexpr: {{#ask: {{#var: queryafter}} |format = count }} < 2<!--
 
         -->{{#ifexpr: {{#ask: {{#var: queryafter}} |format = count }} < 2<!--
 
           then -->|<!--
 
           then -->|<!--
             situation {{PAGENAME}} is the very last page: get the first one
+
             situation {{FULLPAGENAME}} is the very last page: get the first one
 
           -->{{#ask: {{#var: querybefore}} |order=asc | searchlabel=|link=none|limit=1|sort={{#var: propertyPageName}} }}<!--
 
           -->{{#ask: {{#var: querybefore}} |order=asc | searchlabel=|link=none|limit=1|sort={{#var: propertyPageName}} }}<!--
 
           else -->|<!--
 
           else -->|<!--
Zeile 68: Zeile 68:
 
         -->{{#ifexpr: {{#ask: {{#var: querybefore}} |format = count }} < 2<!--
 
         -->{{#ifexpr: {{#ask: {{#var: querybefore}} |format = count }} < 2<!--
 
           then -->|<!--
 
           then -->|<!--
             situation {{PAGENAME}} is the very first page: get the last one
+
             situation {{FULLPAGENAME}} is the very first page: get the last one
 
           -->{{#ask: {{#var: queryafter}} |order=desc | searchlabel=|link=none|limit=1|sort={{#var: propertyPageName}} }}<!--
 
           -->{{#ask: {{#var: queryafter}} |order=desc | searchlabel=|link=none|limit=1|sort={{#var: propertyPageName}} }}<!--
 
           else -->|<!--
 
           else -->|<!--
Zeile 92: Zeile 92:
 
         -->{{#ifexpr: {{#ask: {{#var: queryafter}} |format = count }} < 2<!--
 
         -->{{#ifexpr: {{#ask: {{#var: queryafter}} |format = count }} < 2<!--
 
           then -->|<!--
 
           then -->|<!--
             situation {{PAGENAME}} is the very last page: get the first one
+
             situation {{FULLPAGENAME}} is the very last page: get the first one
 
           -->{{#ask: {{#var: querybefore}} |order=asc | searchlabel=|link=none|limit=1|sort={{#var: propertyPageName}} }}<!--
 
           -->{{#ask: {{#var: querybefore}} |order=asc | searchlabel=|link=none|limit=1|sort={{#var: propertyPageName}} }}<!--
 
           else -->|<!--
 
           else -->|<!--
Zeile 123: Zeile 123:
 
     --><td style="text-align: center; width: auto;"><!--
 
     --><td style="text-align: center; width: auto;"><!--
 
       -->{{Multilingual switch<!--
 
       -->{{Multilingual switch<!--
         -->|de=Bilder in alphabetischer Reihenfolge vor und nach „{{{compare with|{{PAGENAME}} }}}“<!--
+
         -->|de=Bilder in alphabetischer Reihenfolge vor und nach „{{{compare with|{{FULLPAGENAME}} }}}“<!--
         -->|en=Browse images in alphabetical order before and after “{{{compare with|{{PAGENAME}} }}}”}}</td><!--
+
         -->|en=Browse images in alphabetical order before and after “{{{compare with|{{FULLPAGENAME}} }}}”}}</td><!--
 
     --><td style="text-align: right; width: 9em;">[[:{{#explode: {{#var: pagesafter}}|,|-1}}|{{Multilingual switch| de = vorwärts | en = forward}} &rarr;]]</td><!--
 
     --><td style="text-align: right; width: 9em;">[[:{{#explode: {{#var: pagesafter}}|,|-1}}|{{Multilingual switch| de = vorwärts | en = forward}} &rarr;]]</td><!--
 
   --></tr></table><!--
 
   --></tr></table><!--
Zeile 146: Zeile 146:
 
         -->[[{{{compare with|{{FULLPAGENAME}}}}}|<!--
 
         -->[[{{{compare with|{{FULLPAGENAME}}}}}|<!--
 
         add 'File:' if necessary
 
         add 'File:' if necessary
       -->{{#switch:  {{#explode: {{{compare with|{{PAGENAME}}}}}|:|0}}<!--
+
       -->{{#switch:  {{#explode: {{{compare with|{{FULLPAGENAME}}}}}|:|0}}<!--
       -->| Datei | File = File:{{{compare with|{{PAGENAME}}}}}<!--
+
       -->| Datei | File = File:{{{compare with|{{FULLPAGENAME}}}}}<!--
       -->| #default = {{{compare with|{{PAGENAME}}}}}<!--
+
       -->| #default = {{{compare with|{{FULLPAGENAME}}}}}<!--
 
       -->}}|thumb|middle|center|120x120px]]</td><!--
 
       -->}}|thumb|middle|center|120x120px]]</td><!--
  
Zeile 165: Zeile 165:
 
     --><div style="float:right;margin-left:1em;margin-bottom:0.5ex;" class="noprint">[[File:Farm-Fresh book next.png|link={{#var: pageafter}}|{{#var: pageafterNoNs}}]]</div>
 
     --><div style="float:right;margin-left:1em;margin-bottom:0.5ex;" class="noprint">[[File:Farm-Fresh book next.png|link={{#var: pageafter}}|{{#var: pageafterNoNs}}]]</div>
 
| navigation long = {{Navigation
 
| navigation long = {{Navigation
     | backlink = {{#ifeq: {{#var: pagebefore}}|{{PAGENAME}}|<!-- nothing -->|{{#ifeq: {{#var: pagebefore}}|{{#var: pageafter}}|<!-- nothing -->|{{#var: pagebefore}} }} }}
+
     | backlink = {{#ifeq: {{#var: pagebefore}}|{{FULLPAGENAME}}|<!-- nothing -->|{{#ifeq: {{#var: pagebefore}}|{{#var: pageafter}}|<!-- nothing -->|{{#var: pagebefore}} }} }}
 
     | backtext = <!--
 
     | backtext = <!--
     -->{{#ifeq: {{#var: pagebeforeNoNs}} | {{PAGENAME}}<!--
+
     -->{{#ifeq: {{#var: pagebeforeNoNs}} | {{FULLPAGENAME}}<!--
 
     then-->|<!-- nothing
 
     then-->|<!-- nothing
 
     else-->|{{#ifeq: {{#var: pagebeforeNoNs}} | {{#var: pageafterNoNs}}<!--
 
     else-->|{{#ifeq: {{#var: pagebeforeNoNs}} | {{#var: pageafterNoNs}}<!--
Zeile 176: Zeile 176:
 
     | uplink  = {{{link up|}}}
 
     | uplink  = {{{link up|}}}
 
     | uptext  = {{{link up text|}}}
 
     | uptext  = {{{link up text|}}}
     | forwardlink    = {{#ifeq: {{#var: pagebefore}}|{{PAGENAME}}|<!-- nothing -->|{{#var: pageafter}} }}
+
     | forwardlink    = {{#ifeq: {{#var: pagebefore}}|{{FULLPAGENAME}}|<!-- nothing -->|{{#var: pageafter}} }}
 
     | forwardtext    = <!--
 
     | forwardtext    = <!--
       -->{{#ifeq: {{#var: pageafterNoNs}} | {{PAGENAME}}<!--
+
       -->{{#ifeq: {{#var: pageafterNoNs}} | {{FULLPAGENAME}}<!--
 
           then-->|<!-- nothing
 
           then-->|<!-- nothing
 
           else-->|{{#var: pageafterNoNs}}<!--
 
           else-->|{{#var: pageafterNoNs}}<!--

Aktuelle Version vom 31. Juli 2018, 15:10 Uhr

Technische Dokumentation

Die Vorlage setzt das Attribut: Seitenname, das nötig ist um Vorgänger und Nachfolger innerhalb einer Suchabfrage zu bestimmen.

Variablen: pagesafter (Zahl), pagesbefore (Zahl), pageafter (Seite), pagebefore (Seite)

Zu tun: Bug in SMW wenn Seiten abweichende Sortierung → Falsche #ask Ergebnisse