Es gibt z.Z. Probleme mit einem Update, es ist nur Lesen möglich.
Currently there are issues with the installation, readonly possible for now.

Difference between revisions of "Template:CatCatalogue"

From Jigsaw-Wiki
Jump to: navigation, search
(example)
(determine titles smarter)
 
(3 intermediate revisions by the same user not shown)
Line 20: Line 20:
 
  {{CatCatalogue}}
 
  {{CatCatalogue}}
 
</pre>
 
</pre>
 
+
{{#dplvar:set|_TEST|Schmidt 2008}}
 
ergibt (Beispiel für die Katalogseite "Schmidt 2008") als Header der Seite:
 
ergibt (Beispiel für die Katalogseite "Schmidt 2008") als Header der Seite:
<h1>{{JW:Puzzle-Catalogue}} '''"Schmidt 2008"'''</h1>
+
<h1>{{JW:Puzzle-Catalogue}} '''"{{#dplvar:_TEST}}"'''</h1>
{{#dplvar:set|_PN|{{#replace:Schmidt 2008| |_}}}}<!--
+
<!-- find pos of year -->{{#dplvar:set|_x|{{#if:{{#pos:{{#dplvar:_TEST}}|19}}|{{#pos:{{#dplvar:_TEST}}|19}}|{{#pos:{{#dplvar:_TEST}}|20}}}}}}<!--
-- find pos of year -->{{#dplvar:set|_x|{{#if:{{#pos:{{#dplvar:_PN}}|_19}}|{{#pos:{{#dplvar:_PN}}|_19}}|{{#pos:{{#dplvar:_PN}}|_20}}}}}}<!--
+
  -- set variable for Producer -->{{#dplvar:set|_PR|{{#sub:{{#dplvar:_TEST}}|0|{{#expr:{{#dplvar:_x}}}}}}}}<!--
-- set variable for Producer -->{{#dplvar:set|_PR|{{#sub:{{#dplvar:_PN}}|0|{{#expr:{{#dplvar:_x}}}}}}}}<!--
+
--><div style="border:2px solid black;border-radius:5px;padding:2px;">
-- use spaces again -->{{#dplvar:set|_PR|{{#replace:{{#dplvar:_PR}}|_|&nbsp;}}}}<!--
+
{| style="background-color:Gainsboro; display:block;"
--><div style="display:block; text-align:left; background:Gainsboro;">
+
| rowspan="2" | [[File:Cat-Catalogue.svg|80px|{{JW:Puzzle-Catalogue}}|link=]] || <div style="background-color:Gainsboro; display:block;">'''{{Project:Puzzle-Producer}} : ''' [[:Category:Producer|{{Project:Cat-Header-All}}‎]] &bull; [[:Category:{{#dplvar:_PR}}|{{#dplvar:_PR}}]]</div>
{|  
 
| rowspan="2" | [[File:Cat Catalogue.jpg|80px|{{JW:Puzzle-Catalogue}}]] || <div style="margin:5px; display:block; text-align:left; background:Gainsboro;">'''{{Project:Puzzle-Producer}} : ''' [[:Category:Producer|{{Project:Cat-Header-All}}‎]] &bull; [[:Category:{{#dplvar:_PR}}|{{#dplvar:_PR}}]]</div>
 
 
|-
 
|-
 
| <div style="margin:5px; display:block; text-align:left; background:Gainsboro;">'''{{JW:Puzzle-Catalogue}} : ''' [[:Category:Catalogues|{{Project:Cat-Header-All}}‎]]{{#dpl:
 
| <div style="margin:5px; display:block; text-align:left; background:Gainsboro;">'''{{JW:Puzzle-Catalogue}} : ''' [[:Category:Catalogues|{{Project:Cat-Header-All}}‎]]{{#dpl:
Line 36: Line 34:
 
  |titlematch=%{{#dplvar:_PR}} %
 
  |titlematch=%{{#dplvar:_PR}} %
 
  |ordermethod=sortkey
 
  |ordermethod=sortkey
  |format=, &bull; [[%TITLE%|%TITLE%]],,
+
  |format=, &bull; [[%TITLE%|²{#sub:%TITLE%¦²{#dplvar:_x}² }²]],,
 
}}</div>
 
}}</div>
 
|}</div>
 
|}</div>
 
+
[[Category:Category templates]]</noinclude><includeonly><!--
[[Category:Category templates]]</noinclude><includeonly><!-- define var for PAGENAME -->{{#dplvar:set|_PN|{{#replace:{{PAGENAME}}| |_}}}}<!--
+
<!-- find pos of year -->{{#dplvar:set|_x|{{#if:{{#pos:{{PAGENAME}}|19}}|{{#pos:{{PAGENAME}}|19}}|{{#pos:{{PAGENAME}}|20}}}}}}<!--
-- find pos of year -->{{#dplvar:set|_x|{{#if:{{#pos:{{#dplvar:_PN}}|_19}}|{{#pos:{{#dplvar:_PN}}|_19}}|{{#pos:{{#dplvar:_PN}}|_20}}}}}}<!--
+
  -- set variable for Producer -->{{#dplvar:set|_PR|{{#sub:{{PAGENAME}}|0|{{#expr:{{#dplvar:_x}}}}}}}}<!--
-- set variable for Producer -->{{#dplvar:set|_PR|{{#sub:{{#dplvar:_PN}}|0|{{#expr:{{#dplvar:_x}}}}}}}}<!--
 
-- use spaces again -->{{#dplvar:set|_PR|{{#replace:{{#dplvar:_PR}}|_|&nbsp;}}}}<!--
 
 
-->{{DISPLAYTITLE:{{JW:Puzzle-Catalogue}} '''"{{PAGENAME}}"'''}}<!--
 
-->{{DISPLAYTITLE:{{JW:Puzzle-Catalogue}} '''"{{PAGENAME}}"'''}}<!--
--><div style="display:block; text-align:left; background:Gainsboro;">
+
--><div style="border:2px solid black;border-radius:5px;padding:2px;">
{|  
+
{| style="background-color:Gainsboro; display:block;"
| rowspan="2" | [[File:Cat Catalogue.jpg|80px|{{JW:Puzzle-Catalogue}}]] || <div style="margin:5px; display:block; text-align:left; background:Gainsboro;">'''{{Project:Puzzle-Producer}} : ''' [[:Category:Producer|{{Project:Cat-Header-All}}‎]] &bull; [[:Category:{{#dplvar:_PR}}|{{#dplvar:_PR}}]]</div>
+
| rowspan="2" | [[File:Cat-Catalogue.svg|80px|{{JW:Puzzle-Catalogue}}|link=]] || <div style="margin:5px; display:block; text-align:left; background:Gainsboro;">'''{{Project:Puzzle-Producer}} : ''' [[:Category:Producer|{{Project:Cat-Header-All}}‎]] &bull; [[:Category:{{#dplvar:_PR}}|{{#dplvar:_PR}}]]</div>
 
|-
 
|-
 
| <div style="margin:5px; display:block; text-align:left; background:Gainsboro;">'''{{JW:Puzzle-Catalogue}} : ''' [[:Category:Catalogues|{{Project:Cat-Header-All}}‎]]{{#dpl:
 
| <div style="margin:5px; display:block; text-align:left; background:Gainsboro;">'''{{JW:Puzzle-Catalogue}} : ''' [[:Category:Catalogues|{{Project:Cat-Header-All}}‎]]{{#dpl:
Line 54: Line 50:
 
  |titlematch=%{{#dplvar:_PR}} %
 
  |titlematch=%{{#dplvar:_PR}} %
 
  |ordermethod=sortkey
 
  |ordermethod=sortkey
  |format=, &bull; [[%TITLE%|%TITLE%]],,
+
  |format=, &bull; [[%TITLE%|²{#sub:%TITLE%¦²{#dplvar:_x}² }²]],,
 
}}</div>
 
}}</div>
 
|}</div>[[Category:Catalogues]]</includeonly>
 
|}</div>[[Category:Catalogues]]</includeonly>

Latest revision as of 13:05, 9 December 2019

Vorlage: CatCatalogue

Parameter: keine

Anzeige der Kopfdaten für einen Puzzle-Katalog.

Angezeigt werden:

  • Kategorie-Bild
  • Links zu
- alle Hersteller
- Hersteller zu diesem Katalog (wird aus dem Seitentitel ermittelt)
- alle Kataloge
- alle Kataloge dieses Herstellers

Es erfolgt eine automatische Zuordnung zur Kategorie:Kataloge.

Beispiel:

 {{CatCatalogue}}

ergibt (Beispiel für die Katalogseite "Schmidt 2008") als Header der Seite:

Catalogue "Schmidt 2008"

Catalogue
Producer : All‎Schmidt
Catalogue : All‎20052005-Kinkade20062008