Difference between revisions of "Template:Gallery"

From SolidsWiki
Jump to navigation Jump to search
 
Line 1: Line 1:
<includeonly><table style="background-color:white; border:1px solid #f0f0f0; margin-top:0.5em;">{{#If:{{{caption|{{{titel|}}}}}}|<tr><td colspan="10" style="text-align:center; font-weight:bold;">{{{caption|{{{titel}}}}}}</td></tr>}}<tr><td><!--
== Syntax ==
-->{{Gallery/Sub|{{{1|sin_bandera.svg}}}|{{{2|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}<!--
The basic syntax is:
-->{{#If:{{{3|}}}|{{Gallery/Sub|{{{3|}}}|{{{4|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{5|}}}|{{Gallery/Sub|{{{5|}}}|{{{6|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{7|}}}|{{Gallery/Sub|{{{7|}}}|{{{8|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{9|}}}|{{Gallery/Sub|{{{9|}}}|{{{10|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{11|}}}|{{Gallery/Sub|{{{11|}}}|{{{12|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{13|}}}|{{Gallery/Sub|{{{13|}}}|{{{14|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{15|}}}|{{Gallery/Sub|{{{15|}}}|{{{16|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{17|}}}|{{Gallery/Sub|{{{17|}}}|{{{18|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{19|}}}|{{Gallery/Sub|{{{19|}}}|{{{20|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{21|}}}|{{Gallery/Sub|{{{21|}}}|{{{22|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{23|}}}|{{Gallery/Sub|{{{23|}}}|{{{24|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{25|}}}|{{Gallery/Sub|{{{25|}}}|{{{26|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{27|}}}|{{Gallery/Sub|{{{27|}}}|{{{28|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{29|}}}|{{Gallery/Sub|{{{29|}}}|{{{30|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{31|}}}|{{Gallery/Sub|{{{31|}}}|{{{32|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{33|}}}|{{Gallery/Sub|{{{33|}}}|{{{34|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{35|}}}|{{Gallery/Sub|{{{35|}}}|{{{36|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{37|}}}|{{Gallery/Sub|{{{37|}}}|{{{38|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{39|}}}|{{Gallery/Sub|{{{39|}}}|{{{40|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{41|}}}|{{Gallery/Sub|{{{41|}}}|{{{42|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{43|}}}|{{Gallery/Sub|{{{43|}}}|{{{44|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{45|}}}|{{Gallery/Sub|{{{45|}}}|{{{46|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{47|}}}|{{Gallery/Sub|{{{47|}}}|{{{48|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{49|}}}|{{Gallery/Sub|{{{49|}}}|{{{50|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{51|}}}|{{Gallery/Sub|{{{51|}}}|{{{52|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{53|}}}|{{Gallery/Sub|{{{53|}}}|{{{54|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{55|}}}|{{Gallery/Sub|{{{55|}}}|{{{56|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{57|}}}|{{Gallery/Sub|{{{57|}}}|{{{58|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{59|}}}|{{Gallery/Sub|{{{59|}}}|{{{60|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{61|}}}|{{Gallery/Sub|{{{61|}}}|{{{62|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{63|}}}|{{Gallery/Sub|{{{63|}}}|{{{64|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{65|}}}|{{Gallery/Sub|{{{65|}}}|{{{66|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{67|}}}|{{Gallery/Sub|{{{67|}}}|{{{68|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{69|}}}|{{Gallery/Sub|{{{69|}}}|{{{70|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{71|}}}|{{Gallery/Sub|{{{71|}}}|{{{72|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{73|}}}|{{Gallery/Sub|{{{73|}}}|{{{74|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{75|}}}|{{Gallery/Sub|{{{75|}}}|{{{76|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
-->{{#If:{{{77|}}}|{{Gallery/Sub|{{{77|}}}|{{{78|}}}|breedte={{{breedte|180}}}|regels={{{regels|2}}}}}}}<!--
--></td></tr>{{#If:{{{79|}}}|<tr><td style="text-align:center; color:red;">N.B.: Het maximum aantal te tonen afbeeldingen (39) is overschreden !</td></tr>}}</table></includeonly><noinclude>{{Sjablooninfo|1=


==Doel==
<pre>
Het plaatsen van maximaal 39 afbeeldingen in een galerij, waarbij het aantal afbeeldingen per rij zich aanpast aan de beschikbare ruimte. De afbeeldingen worden (tenzij anders opgegeven) weergegeven op een formaat van maximaal 180 x 180 pixels.
<gallery>
File:wiki.png
File:wiki.png|Captioned
File:wiki.png|Captioned with alt text|alt=The Wikipedia logo
File:wiki.png|[[Help:Contents/Links|Links]] can be put in captions.
File:wiki.png|Full [[MediaWiki]]<br />[[syntax]] may now be used&hellip;
</gallery>
</pre>


==Parameters==
Which produces:
*titel (of caption) - optioneel; geeft een titel in vette tekst midden boven de galerij
*breedte - optioneel; bepaalt de maximale breedte (en hoogte) van elke afbeelding; de verstekwaarde is 180
*regels - optioneel; kan opgegeven worden om ruimte te maken voor het gewenste aantal tekstregels onder elke afbeelding; de verstekwaarde is 2; bij overloop verschijnt een scrollbar
*geef per afbeelding twee parameters op: de bestandsnaam en het onderschrift


==Voorbeeld==
<gallery>
<pre>{{Gallery
File:wiki.png
| titel=Demo
File:wiki.png|Captioned
| breedte=150
File:wiki.png|Captioned with alt text|alt=The Wikipedia logo
| Bossuhuizen1.jpg|[[Bossuhuizen]]
File:wiki.png|[[Help:Contents/Links|Links]] can be put in captions.
| Hoorn_Oosterpoort_008_corr.jpg|Oosterpoort, Hoorn
File:wiki.png|Full [[MediaWiki]]<br />[[syntax]] may now be used&hellip; 
| Detail_overkapping_C.S..JPG|Overkapping Amsterdam CS
</gallery>
| Voelermaat.jpg|[[Voelermaat]]
}}</pre>


;Resultaat
The extended syntax is (see ''[[m:Help:Images and other uploaded files#Gallery|gallery tag help]]'' and below for full list of parameters):
{{Gallery
| titel=Demo
| breedte=150
| Bossuhuizen1.jpg|[[Bossuhuizen]]
| Hoorn_Oosterpoort_008_corr.jpg|Oosterpoort, Hoorn
| Detail_overkapping_C.S..JPG|Overkapping Amsterdam CS
| Voelermaat.jpg|[[Voelermaat]]
}}


==Zie ook==
<pre><gallery caption="Sample gallery" widths="180px" heights="120px" perrow="3">
}}
File:wiki.png
File:wiki.png|Captioned
File:wiki.png|Captioned with alt text|alt=The Wikipedia logo
File:wiki.png|[[Help:Contents/Links|Links]] can be put in captions.
File:wiki.png|Full [[MediaWiki]]<br />[[syntax]] may now be used&hellip;
</gallery></pre>




</noinclude>
Which produces:
 
<gallery caption="Sample gallery" widths="180px" heights="120px" perrow="3">
File:wiki.png
File:wiki.png|Captioned
File:wiki.png|Captioned with alt text|alt=The Wikipedia logo
File:wiki.png|[[Help:Contents/Links|Links]] can be put in captions.
File:wiki.png|Full MediaWiki<br />syntax may now be used&hellip;
</gallery>
 
* Images are separated by new lines.
* Captions are optional.
* Notice that there are no brackets except for links within captions.
* A common mistake is to forget the closing <nowiki></gallery></nowiki> tag.
* The default width and height is 120px.
* If <code>perrow=</code> is omitted, the width is fluid: one row comprises as many images as will fit across the available width. Prior to MediaWiki 1.17, the default was 4.

Revision as of 19:27, 23 August 2012

Syntax

The basic syntax is:

<gallery>
File:wiki.png
File:wiki.png|Captioned
File:wiki.png|Captioned with alt text|alt=The Wikipedia logo
File:wiki.png|[[Help:Contents/Links|Links]] can be put in captions.
File:wiki.png|Full [[MediaWiki]]<br />[[syntax]] may now be used…
</gallery>

Which produces:

The extended syntax is (see gallery tag help and below for full list of parameters):

<gallery caption="Sample gallery" widths="180px" heights="120px" perrow="3">
File:wiki.png
File:wiki.png|Captioned
File:wiki.png|Captioned with alt text|alt=The Wikipedia logo
File:wiki.png|[[Help:Contents/Links|Links]] can be put in captions.
File:wiki.png|Full [[MediaWiki]]<br />[[syntax]] may now be used…
</gallery>


Which produces:

  • Images are separated by new lines.
  • Captions are optional.
  • Notice that there are no brackets except for links within captions.
  • A common mistake is to forget the closing </gallery> tag.
  • The default width and height is 120px.
  • If perrow= is omitted, the width is fluid: one row comprises as many images as will fit across the available width. Prior to MediaWiki 1.17, the default was 4.