Template:Gallery/doc

From NewgonWiki
Revision as of 06:31, 26 February 2009 by Pantheadoros (talk | contribs) (New page: {{Documentation subpage}} {{For|the cleanup tag|Template:cleanup-gallery}} This template:gallery, using template:gallery/aux, shows up to 30 images. Every image is embedded in it...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

{{#if: |

File:Edit-paste.svg This is the template documentation page for Template:Gallery.
This page may not be intended to be viewed directly.
Links using variables may appear broken; do not replace these with hardcoded page names or URLs.

{{#if:x||

}} |{{#ifeq: doc | doc

 | 

{{

   #ifeq: show | show
   | {{
 {{#switch:
 {{#if: 
   | 
   | {{#ifeq:template|
     | main
     | {{#ifeq:template|template talk
       | talk
       | template 
       }}
     }} 
   }}

| main = ambox | talk = tmbox | user = ombox | wikipedia = ombox | file | image = imbox | mediawiki = ombox | template = ombox | help = ombox | category = cmbox | portal = ombox | other | #default = ombox

}} | type = notice | image = File:Edit-copy green.svg | imageright = | style = | textstyle = | text = This is a documentation subpage for Template:Gallery (see that page for the {{ #if: | {{{text1}}} | {{ #ifeq: Template | User | template template | {{ #if: Template | template | article }}}}}} itself).
It contains usage information, categories and other content that is not part of the original {{ #if: | {{{text2}}} | {{ #if: | {{{text1}}} | {{ #ifeq: Template | User | template template page | {{ #if: Template |template page|article}}}}}}}}. | small = | smallimage = | smallimageright = | smalltext = }}

   }}{{
   #if: 
   | 
   | [[Category:{{
     #if: Template
     | Template
     | Article
   }} documentation]]
 }}

| }} }}

This template:gallery, using template:gallery/aux, shows up to 30 images. Every image is embedded in its own HTML-table, and are floated left. The number of images per row is based upon the width specified and the width of the screen, which allows greator flexibility than the <gallery> tag.

Parameters

Required

There are several parameters that should be specified after the tranclusion Gallery:

  • lines the default is two, this parameter should be specified to the number of lines needed for the largest caption. If the specification is too low: the text will be cut off. If the specification is too high: excessive space is placed below the caption.
  • |[image]|[caption] following the pipe symbol " | " (generally located above the enter key) the image location should be specified, if this parameter is not specified an image with a question mark is defaulted. Following a second pipe, the caption should be specified, the default is a blank non-breaking space. Iterate the previous until all images are entered into the tranclusion, the limit is currently 30.

Optional

There are several parameters that are optional to this transculsion:

  • title this parameter produces a title for the gallery
  • width the default is 180px, this parameter specifies the maximum width and height of each image, and the width of each cell.

Example

Code

{{Gallery
|title=Title of gallery goes here
|footer=*Image credit: Wikipedia, the free encyclopedia<br />**and so on...
|width=150
|lines=2
|Image:Wiki.png|this is a caption
|Image:Wiki.png|
|Image:Wiki.png|
|Image:Wiki.png|
|Image:Wiki.png|
|Image:Wiki.png|
|Image:Wiki.png|
|Image:Wiki.png|
|Image:Wiki.png|[[Help:Contents/Links|Links]] can be put in captions.
|Image:Wiki.png|
|Image:Wiki.png|
|Image:Wiki.png|
|Image:Wiki.png|Full [[MediaWiki]]<br />[[syntax]] may now be used…
|Image:Wiki.png|
}}

Result

{{#if:Title of gallery goes here|}}{{#if:|}}{{#if:*Image credit: Wikipedia (c)2008
**and so on...|}}
Title of gallery goes here
this is a caption*
this is a caption*
this is a caption*  
{{#if:Image:Wiki.png|
 
}}{{#if:Image:Wiki.png|
 
}}{{#if:Image:Wiki.png|
 
}}{{#if:Image:Wiki.png|
 
}}{{#if:Image:Wiki.png|
 
}}{{#if:Image:Wiki.png|
 
}}{{#if:Image:Wiki.png|
 
}}{{#if:Image:Wiki.png|
Links can be put in captions.
Links can be put in captions.
Links can be put in captions.  
}}{{#if:Image:Wiki.png|
 
}}{{#if:Image:Wiki.png|
 
}}{{#if:Image:Wiki.png|
 
}}{{#if:Image:Wiki.png|
Full MediaWiki syntax may now be used…**
Full MediaWiki
syntax may now be used…**
Full MediaWiki
syntax may now be used…**  
}}{{#if:Image:Wiki.png|
 
}}{{#if:|
[[|center|border|150x150px|]]
 
}}{{#if:|
[[|center|border|150x150px|]]
 
}}{{#if:|
[[|center|border|150x150px|]]
 
}}{{#if:|
[[|center|border|150x150px|]]
 
}}{{#if:|
[[|center|border|150x150px|]]
 
}}{{#if:|
[[|center|border|150x150px|]]
 
}}{{#if:|
[[|center|border|150x150px|]]
 
}}{{#if:|
[[|center|border|150x150px|]]
 
}}{{#if:|
[[|center|border|150x150px|]]
 
}}{{#if:|
[[|center|border|150x150px|]]
 
}}{{#if:|
[[|center|border|150x150px|]]
 
}}{{#if:|
[[|center|border|150x150px|]]
 
}}{{#if:|
[[|center|border|150x150px|]]
 
}}{{#if:|
[[|center|border|150x150px|]]
 
}}{{#if:|
[[|center|border|150x150px|]]
 
}}{{#if:|
[[|center|border|150x150px|]]
 
}}
The maximum number of images (30) is exceeded !
*Image credit: Wikipedia (c)2008
**and so on...

See also

refresh page/purge cache

nl:Sjabloon:Gallery no:Mal:Gallery pt:Predefinição:Galeria ta:வார்ப்புரு:Gallery te:మూస:Gallery