Difference between revisions of "Template:Lead/Inner"

From Species-ID
Jump to: navigation, search
(simplifying, taking out smooth gallery)
Line 51: Line 51:
  
 
// START EXTRA INFO and IMAGES:  
 
// START EXTRA INFO and IMAGES:  
// Extra text and images are in the optional parameters: "synonyms", "description", "occurrence", "remarks" (already combined to detailtext here), and "image 2a/caption 2a" to "image 2i/caption2i".
+
// Extra text and images from the optional parameters: "synonyms", "description", "occurrence", "remarks" are already combined to detailtext here. "image 2a/caption 2a" to "image 2i/caption2i" are tested.
 
// For smooth gallery, images and detailtext displayed side-by-side, for wrappable gallery images are below detailtext -->{{
 
// For smooth gallery, images and detailtext displayed side-by-side, for wrappable gallery images are below detailtext -->{{
 
#if: {{{detailtext}}}{{{image 2a}}}<!--
 
#if: {{{detailtext}}}{{{image 2a}}}<!--
THEN-->|<tr><td class="leadextras" colspan="2"><table class="leadextras" cellspacing="0" cellpadding="0" width="100%"><tr>{{
+
THEN-->|<tr><td class="leadextras" colspan="2"><div class="leadextras">{{{detailtext}}}{{
  #if: {{{detailtext}}}|{{{detailtext}}}<!--
+
  // IF also images and gallerytype not smooth gallery, then create new row:
+
  -->{{#if:{{{image 2a}}}| {{#ifeq:{{lc:{{{gallerytype}}}}}|smooth||</tr><tr>}} }}
+
  }}{{
+
 
   #if: {{{image 2a}}}<!-- at least 1 extra image present, either after extra text, or alone: START Secondary-IMAGE CONTENT
 
   #if: {{{image 2a}}}<!-- at least 1 extra image present, either after extra text, or alone: START Secondary-IMAGE CONTENT
   THEN-->|<td class="leadimages">{{#switch: {{lc: {{{gallerytype}}} }}<!--
+
   THEN-->|<table style="border:none; margin-top:0.25em;"><tr><td><!--
  -->| #default =<!--
+
  // BEGIN wrappable image gallery, modified from Template:Gallery. Execute only if at least 1 image exists.
+
  // Special parameters supported here:
+
  // | gallerytype = smooth (using SmoothGallery extension) or (nothing/empty)
+
  // | imagesfooter  =footer text (for wrappable and smooth)
+
  // | image 2a - 2i, caption 2a - 2i (for all types)
+
  // | captionlines = 3 (default is 2) (for wrappable only)
+
  // | image 2a - 2i width,  images 2 width  (for wrappable only)
+
  // | image 2a - 2i height, images 2 height (for wrappable only)
+
  // | images 2 resize    (for wrappable only, default=1, 0 to prevent resize)
+
  --><table style="border:none; margin-top:0.25em;"><tr><td><!--
+
 
-->{{#if: {{{image 2a}}}|{{Lead/GalleryItem|image={{{image 2a}}}|caption={{{caption 2a}}}|label={{{label 2a}}}|width={{{image 2a width}}}|height={{{image 2a height}}}|resize={{{images 2 resize}}}|lines={{{captionlines}}}|keyID={{{keyID}}}|next={{{nextlead}}}|resultpage={{{resultpage}}}}}}}<!--
 
-->{{#if: {{{image 2a}}}|{{Lead/GalleryItem|image={{{image 2a}}}|caption={{{caption 2a}}}|label={{{label 2a}}}|width={{{image 2a width}}}|height={{{image 2a height}}}|resize={{{images 2 resize}}}|lines={{{captionlines}}}|keyID={{{keyID}}}|next={{{nextlead}}}|resultpage={{{resultpage}}}}}}}<!--
 
-->{{#if: {{{image 2b}}}|{{Lead/GalleryItem|image={{{image 2b}}}|caption={{{caption 2b}}}|label={{{label 2b}}}|width={{{image 2b width}}}|height={{{image 2b height}}}|resize={{{images 2 resize}}}|lines={{{captionlines}}}|keyID={{{keyID}}}|next={{{nextlead}}}|resultpage={{{resultpage}}}}}}}<!--
 
-->{{#if: {{{image 2b}}}|{{Lead/GalleryItem|image={{{image 2b}}}|caption={{{caption 2b}}}|label={{{label 2b}}}|width={{{image 2b width}}}|height={{{image 2b height}}}|resize={{{images 2 resize}}}|lines={{{captionlines}}}|keyID={{{keyID}}}|next={{{nextlead}}}|resultpage={{{resultpage}}}}}}}<!--
Line 82: Line 67:
 
-->{{#if: {{{image 2i}}}|{{Lead/GalleryItem|image={{{image 2i}}}|caption={{{caption 2i}}}|label={{{label 2i}}}|width={{{image 2i width}}}|height={{{image 2i height}}}|resize={{{images 2 resize}}}|lines={{{captionlines}}}|keyID={{{keyID}}}|next={{{nextlead}}}|resultpage={{{resultpage}}}}}}}<!--
 
-->{{#if: {{{image 2i}}}|{{Lead/GalleryItem|image={{{image 2i}}}|caption={{{caption 2i}}}|label={{{label 2i}}}|width={{{image 2i width}}}|height={{{image 2i height}}}|resize={{{images 2 resize}}}|lines={{{captionlines}}}|keyID={{{keyID}}}|next={{{nextlead}}}|resultpage={{{resultpage}}}}}}}<!--
 
--></td></tr>{{#if:{{{imagesfooter}}}|<tr><td colspan="10" style="text-align:right; font-size:80%; line-height:1em;">{{{imagesfooter}}}</td></tr>}}</table><!--
 
--></td></tr>{{#if:{{{imagesfooter}}}|<tr><td colspan="10" style="text-align:right; font-size:80%; line-height:1em;">{{{imagesfooter}}}</td></tr>}}</table><!--
  -->| smooth =<!--
+
   // END if any images-->}}</td></tr><!--
  // BEGIN SMOOTHGALLERY:
+
  // "sgallery" is the tag name for the java-script-based smooth gallery extension.
+
  // Additional possible sgallery parameters are: slideinfozoneslide=0 | timed=true (= automatically display all images in a slideshow)
+
  -->{{#sgallery: width=320 | height=240
+
| imagelist={{
+
  #if: {{{image 2a}}} | {{{image 2a}}}{{!}}{{{caption 2a}}} }}
+
{{#if: {{{image 2b}}} | {{{image 2b}}}{{!}}{{{caption 2b}}} }}
+
{{#if: {{{image 2c}}} | {{{image 2c}}}{{!}}{{{caption 2c}}} }}
+
{{#if: {{{image 2d}}} | {{{image 2d}}}{{!}}{{{caption 2d}}} }}
+
{{#if: {{{image 2e}}} | {{{image 2e}}}{{!}}{{{caption 2e}}} }}
+
{{#if: {{{image 2f}}} | {{{image 2f}}}{{!}}{{{caption 2f}}} }}
+
{{#if: {{{image 2g}}} | {{{image 2g}}}{{!}}{{{caption 2g}}} }}
+
{{#if: {{{image 2h}}} | {{{image 2h}}}{{!}}{{{caption 2h}}} }}
+
{{#if: {{{image 2i}}} | {{{image 2i}}}{{!}}{{{caption 2i}}} }}
+
}}{{
+
#if:{{{imagesfooter}}}|<div style="text-align:right; font-size:80%; line-height:1em;">{{{imagesfooter}}}</div><!--
+
    // END imagesfooter-->}}<!--
+
  // END switch gallerytype + close the image-td-cell for all gallery types: -->}}</td><!--
+
   // END if any images + close inside-row, table, and outside cell+row for extras, -->}}</tr></table>
+
</td></tr><!--
+
 
// END if any extra text or image info in a second row: -->}}<!--  
 
// END if any extra text or image info in a second row: -->}}<!--  
 
// END of lead2col inner table-->
 
// END of lead2col inner table-->
 
</table></td><td>{{#if: {{{image 1a}}}<!-- at least 1 sidebar image present,  
 
</table></td><td>{{#if: {{{image 1a}}}<!-- at least 1 sidebar image present,  
 +
 
// START RIGHT SIDEBAR IMAGE CONTENT,  
 
// START RIGHT SIDEBAR IMAGE CONTENT,  
 
// up to 4 images, non-wrapping, Lead/GalleryItemNoCaption creates td!
 
// up to 4 images, non-wrapping, Lead/GalleryItemNoCaption creates td!
Line 112: Line 78:
 
// image width height, images 1 height
 
// image width height, images 1 height
 
// images 1 resize (default = 1, 0 to prevent resize)
 
// images 1 resize (default = 1, 0 to prevent resize)
 
 
THEN-->|<table style="border:none; margin-top:0.1em;margin-left:1em;"><tr><!--
 
THEN-->|<table style="border:none; margin-top:0.1em;margin-left:1em;"><tr><!--
 
-->{{#if: {{{image 1a}}}|{{Lead/GalleryItemNoCaption|image={{{image 1a}}}|caption={{{caption 1a}}}|label={{{label 1a}}}|width={{{image 1a width}}}|height={{{image 1a height}}}|resize={{{images 1 resize}}}|keyID={{{keyID}}}|next={{{nextlead}}}|resultpage={{{resultpage}}}}}}}<!--
 
-->{{#if: {{{image 1a}}}|{{Lead/GalleryItemNoCaption|image={{{image 1a}}}|caption={{{caption 1a}}}|label={{{label 1a}}}|width={{{image 1a width}}}|height={{{image 1a height}}}|resize={{{images 1 resize}}}|keyID={{{keyID}}}|next={{{nextlead}}}|resultpage={{{resultpage}}}}}}}<!--

Revision as of 21:24, 8 July 2009

Version 2.0: Called by outer template, Collapsible/collapsed added, lead images in right sidebar (primary, "image 1a" etc., max 4 images side-by-side) and below (secondary, "image 2a" etc, max 9 images, wrapping or smooth).

The main documentation for all parts of the single-access key is under Template:Key Start/doc. Add only specific notes here.

The first column contains the lead number plus an anchor (id="") to which internal links may point. Here and further below, the first Lead parameter is split into two parts using the Lead/SplitNumber template.

Note: Retrieving the id-parameter of the earlier "Key Start" template from a variable depends on the "Variables" extension being installed. On Wiki installations where this is not the case, remove the template code "{{#var:SingleAccessKeyID}}" (here, in (outer) Lead itself and Lead/SplitNumber).

(Todo note: add male/female: ♀♂ and diameter/times × to edit-box character selector in wiki. Further characters: ∞≤≥≡≠⅓⅔⅛⅜⅝⅞►±‚„“‘¼½¾±≈▪●, ←↑→↓↕•…‰)

[edit] [purge] Template-info.svg Template documentation

See Key Start for the main documentation.