Maintenance

All wikis at Biowikifarm are in read-only mode due to the restoration after a severe cyberattack in October 2023.
After 1 year being shut down the Biowikifarm is online again.
You see the latest restored version from 18th October 2023.

Difference between revisions of "Template:Lead"

From Species-ID
Jump to: navigation, search
Line 22: Line 22:
  
 
// Next column is the main statement text plus the result. The horizontal distribution of the two columns is variable (using lead2col inner table):
 
// Next column is the main statement text plus the result. The horizontal distribution of the two columns is variable (using lead2col inner table):
--><td class="lead2col"><table class="lead2col {{#if: {{{synonyms|}}}{{{description|}}}{{{occurrence|}}}{{{remarks|}}}{{{imageX1|}}}<!--make table collabsible if EXTRA txt/imgs exist:-->|<nowiki> </nowiki>collapsible collapsed}}" width="100%" cellspacing="0" cellpadding="0"><tr>
+
--><td class="lead2col"><table class="lead2col {{#if: {{{synonyms|}}}{{{description|}}}{{{occurrence|}}}{{{remarks|}}}{{{image 2a|}}}<!--make table collabsible if EXTRA txt/imgs exist:-->|<nowiki> </nowiki>collapsible collapsed}}" width="100%" cellspacing="0" cellpadding="0"><tr>
 
<th class="lead" {{#ifexpr:{{#len:{{{3|}}}{{{result|}}} }} < 5 |width="95%"}}><span class="leadtext">{{Trim|1={{{2|'''Lead statement missing!'''}}}}}&nbsp;</span></th><!--
 
<th class="lead" {{#ifexpr:{{#len:{{{3|}}}{{{result|}}} }} < 5 |width="95%"}}><span class="leadtext">{{Trim|1={{{2|'''Lead statement missing!'''}}}}}&nbsp;</span></th><!--
 
// Next column is a pointer to further leads and/or to a taxon/subkey result; both will be autolinked.
 
// Next column is a pointer to further leads and/or to a taxon/subkey result; both will be autolinked.
Line 30: Line 30:
 
     #if: {{{commonnames|}}}<!--(Note: replace function insert nbsp and at commata; <nowiki> </nowiki> and &#32; are ways to create a blank that is not trimmed; nowiki works better in find, &#32; may word better in replace. ATTENTION: this is sensitive code, it still behaves slightly strange but alternatives did not work at all. Also: replacing with spans to have no-wrap and wrappable spans does not work in mw 1.16, spans are "sanitized"!)
 
     #if: {{{commonnames|}}}<!--(Note: replace function insert nbsp and at commata; <nowiki> </nowiki> and &#32; are ways to create a blank that is not trimmed; nowiki works better in find, &#32; may word better in replace. ATTENTION: this is sensitive code, it still behaves slightly strange but alternatives did not work at all. Also: replacing with spans to have no-wrap and wrappable spans does not work in mw 1.16, spans are "sanitized"!)
 
     THEN-->|<span class="commonnames">&nbsp;{{#replace:{{#replace:{{#replace:{{{commonnames}}}|,<nowiki> </nowiki>|,§§}}|<nowiki> </nowiki>|&nbsp;}}|§§|&#32;}}</span><span class="leadtext"> </span><!--
 
     THEN-->|<span class="commonnames">&nbsp;{{#replace:{{#replace:{{#replace:{{{commonnames}}}|,<nowiki> </nowiki>|,§§}}|<nowiki> </nowiki>|&nbsp;}}|§§|&#32;}}</span><span class="leadtext"> </span><!--
     End if -->}}<span class="leadresult">&nbsp;[[{{Lead/StripFormatting|1={{{result|}}} }}|{{{result}}}]]</span></td>{{
+
     END if commonnames -->}}<span class="leadresult">&nbsp;[[{{Lead/StripFormatting|1={{{result|}}} }}|{{{result}}}]]</span></td>{{
     #if:{{{3|}}}<!-- NEXT-LEAD-POINTER in addition to result:
+
     #if:{{{3|}}}<!-- NEXT-LEAD-POINTER in addition to "result":
     // Result+next-lead co-occur, e.g., for species-result where key continues with subspecies. Put into NEW row, double arrow:
+
     // (result+next-lead co-occur, e.g., for species-result where key continues with subspecies. Put into NEW row, double arrow:)
 
     THEN-->|</tr><tr><td colspan="2" class="leadresult"><span class="leadtext">&nbsp;[[#L{{#var:SingleAccessKeyID}}{{Trim|{{{3}}} }}|►►&nbsp;{{Trim|{{{3}}} }}]]</span></td><!--
 
     THEN-->|</tr><tr><td colspan="2" class="leadresult"><span class="leadtext">&nbsp;[[#L{{#var:SingleAccessKeyID}}{{Trim|{{{3}}} }}|►►&nbsp;{{Trim|{{{3}}} }}]]</span></td><!--
 
     End if next-lead inside result -->}}<!--
 
     End if next-lead inside result -->}}<!--
Line 41: Line 41:
 
// 1. ERROR REPORTING: Any content in 4th and later unnamed parameters is an error.-->{{  
 
// 1. ERROR REPORTING: Any content in 4th and later unnamed parameters is an error.-->{{  
 
#if: {{{4|}}}{{{commonname|}}}{{{image|}}}{{{images|}}}<!--
 
#if: {{{4|}}}{{{commonname|}}}{{{image|}}}{{{images|}}}<!--
then:-->|<tr><th colspan="2" class="leaderror">Error: You may have an erroneous 4th unnamed parameter (vertical bar without a field name), or you may use "commonname/image/images" instead of "commonnames/image1" etc. The content is: {{{4|}}} {{{5|}}} {{{commonname|}}} {{{image|}}} {{{images|}}}. To add images or descriptions use <code><nowiki>|description=Your text|</nowiki></code> ''and'' <code><nowiki>|image1=Image:YourImage.jpg |caption1=Your Caption</nowiki></code>.</th></tr><!--
+
then:-->|<tr><th colspan="2" class="leaderror">Error: You may have an erroneous 4th unnamed parameter (vertical bar without a field name), or you may use "commonname/image/images" instead of "commonnames/image 1a" etc. The content is: {{{4|}}} {{{5|}}} {{{commonname|}}} {{{image|}}} {{{images|}}}. To add images or descriptions use <code><nowiki>|description=Your text|</nowiki></code> ''and'' <code><nowiki>|image 1a=Image:YourImage.jpg |caption 1a=Your Caption</nowiki></code>.</th></tr><!--
 
end:-->}}<!--
 
end:-->}}<!--
 
// END ERROR REPORTING.
 
// END ERROR REPORTING.
  
 
// START EXTRA INFO and IMAGES: Free-form text descriptions and Images are in the optional parameters:  
 
// START EXTRA INFO and IMAGES: Free-form text descriptions and Images are in the optional parameters:  
   "synonyms", "description", "occurrence", "remarks", and "image1/caption1" to "image9/caption9".  
+
   "synonyms", "description", "occurrence", "remarks", and "image 1a/caption 1a" to "image9/caption9".  
 
   Images and descriptions displayed side-by-side (if only one is present this uses a 1-celled-table to simplify styling). -->{{
 
   Images and descriptions displayed side-by-side (if only one is present this uses a 1-celled-table to simplify styling). -->{{
#if: {{{synonyms|}}}{{{description|}}}{{{occurrence|}}}{{{remarks|}}}{{{image1|}}}<!--
+
#if: {{{synonyms|}}}{{{description|}}}{{{occurrence|}}}{{{remarks|}}}{{{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"><table class="leadextras" cellspacing="0" cellpadding="0" width="100%"><tr>{{
 
   #if: {{{synonyms|}}}{{{description|}}}{{{occurrence|}}}{{{remarks|}}}<!--
 
   #if: {{{synonyms|}}}{{{description|}}}{{{occurrence|}}}{{{remarks|}}}<!--
Line 56: Line 56:
 
     }}{{{description|}}} {{{occurrence|}}} {{{remarks|}}}</td><!--
 
     }}{{{description|}}} {{{occurrence|}}} {{{remarks|}}}</td><!--
 
// IF also images and gallerytype=normal gallery, then create new row:
 
// IF also images and gallerytype=normal gallery, then create new row:
-->{{#if:{{{imageX1|}}}| {{#ifeq:{{lc:{{{gallerytype|}}}}}|smooth||</tr><tr>}} }}
+
-->{{#if:{{{image 2a|}}}| {{#ifeq:{{lc:{{{gallerytype|}}}}}|smooth||</tr><tr>}} }}
 
   }}{{
 
   }}{{
   #if: {{{imageX1|}}}<!-- at least 1 extra image present, either after extra text, or alone: START X-IMAGE CONTENT
+
   #if: {{{image 2a|}}}<!-- at least 1 extra image present, either after extra text, or alone: START X-IMAGE CONTENT
 
   THEN-->|<td class="leadimages">{{#switch: {{lc: {{{gallerytype|}}} }}<!--
 
   THEN-->|<td class="leadimages">{{#switch: {{lc: {{{gallerytype|}}} }}<!--
 
   -->| #default =<!--
 
   -->| #default =<!--
Line 65: Line 65:
 
   // | gallerytype = smooth (using SmoothGallery extension) or (nothing/empty)
 
   // | gallerytype = smooth (using SmoothGallery extension) or (nothing/empty)
 
   // | imagesfooter  =footer text (for wrappable and smooth)
 
   // | imagesfooter  =footer text (for wrappable and smooth)
   // | imageX1-9, captionX1-9 (for all types)
+
   // | image 2a - 2i, caption 2a - 2i (for all types)
 
   // | captionlines = 3 (default is 2) (for wrappable only)
 
   // | captionlines = 3 (default is 2) (for wrappable only)
   // | imagewidthX1-9imagesXwidth (for wrappable only)
+
   // | image 2a - 2i widthimages 2 width (for wrappable only)
   // | imageheightX1-9, imagesXheight (for wrappable only)
+
   // | image 2a - 2i height, images 2 height (for wrappable only)
   // | resizeXimages   (for wrappable only, default=1, 0 to prevent resize)
+
   // | images 2 resize   (for wrappable only, default=1, 0 to prevent resize)
 
   --><table style="border:none; margin-top:0.25em;"><tr><td><!--
 
   --><table style="border:none; margin-top:0.25em;"><tr><td><!--
-->{{#if: {{{imageX1|}}}|{{Lead/GalleryItem|image={{{imageX1|}}}|caption={{{captionX1|}}}|width={{{imagewidthX1|{{{imagesXwidth|180}}}}}}|height={{{imageheightX1|{{{imagesXheight|180}}}}}}|resize={{{resizeXimages|1}}}|lines={{{captionlines|2}}}|next={{{3|}}}|result={{{result|}}}}}}}<!--
+
-->{{#if: {{{image 2a|}}}|{{Lead/GalleryItem|image={{{image 2a|}}}|caption={{{caption 2a|}}}|width={{{image 2a width|{{{images 2 width|180}}}}}}|height={{{image 2a height|{{{images 2 height|180}}}}}}|resize={{{images 2 resize|1}}}|lines={{{captionlines|2}}}|next={{{3|}}}|result={{{result|}}}}}}}<!--
-->{{#if: {{{imageX2|}}}|{{Lead/GalleryItem|image={{{imageX2|}}}|caption={{{captionX2|}}}|width={{{imagewidthX2|{{{imagesXwidth|180}}}}}}|height={{{imageheightX2|{{{imagesXheight|180}}}}}}|resize={{{resizeXimages|1}}}|lines={{{captionlines|2}}}|next={{{3|}}}|result={{{result|}}}}}}}<!--
+
-->{{#if: {{{image 2b|}}}|{{Lead/GalleryItem|image={{{image 2b|}}}|caption={{{caption 2b|}}}|width={{{image 2b width|{{{images 2 width|180}}}}}}|height={{{image 2b height|{{{images 2 height|180}}}}}}|resize={{{images 2 resize|1}}}|lines={{{captionlines|2}}}|next={{{3|}}}|result={{{result|}}}}}}}<!--
-->{{#if: {{{imageX3|}}}|{{Lead/GalleryItem|image={{{imageX3|}}}|caption={{{captionX3|}}}|width={{{imagewidthX3|{{{imagesXwidth|180}}}}}}|height={{{imageheightX3|{{{imagesXheight|180}}}}}}|resize={{{resizeXimages|1}}}|lines={{{captionlines|2}}}|next={{{3|}}}|result={{{result|}}}}}}}<!--
+
-->{{#if: {{{image 2c|}}}|{{Lead/GalleryItem|image={{{image 2c|}}}|caption={{{caption 2c|}}}|width={{{image 2c width|{{{images 2 width|180}}}}}}|height={{{image 2c height|{{{images 2 height|180}}}}}}|resize={{{images 2 resize|1}}}|lines={{{captionlines|2}}}|next={{{3|}}}|result={{{result|}}}}}}}<!--
-->{{#if: {{{imageX4|}}}|{{Lead/GalleryItem|image={{{imageX4|}}}|caption={{{captionX4|}}}|width={{{imagewidthX4|{{{imagesXwidth|180}}}}}}|height={{{imageheightX4|{{{imagesXheight|180}}}}}}|resize={{{resizeXimages|1}}}|lines={{{captionlines|2}}}|next={{{3|}}}|result={{{result|}}}}}}}<!--
+
-->{{#if: {{{image 2d|}}}|{{Lead/GalleryItem|image={{{image 2d|}}}|caption={{{caption 2d|}}}|width={{{image 2d width|{{{images 2 width|180}}}}}}|height={{{image 2d height|{{{images 2 height|180}}}}}}|resize={{{images 2 resize|1}}}|lines={{{captionlines|2}}}|next={{{3|}}}|result={{{result|}}}}}}}<!--
-->{{#if: {{{imageX5|}}}|{{Lead/GalleryItem|image={{{imageX5|}}}|caption={{{captionX5|}}}|width={{{imagewidthX5|{{{imagesXwidth|180}}}}}}|height={{{imageheightX5|{{{imagesXheight|180}}}}}}|resize={{{resizeXimages|1}}}|lines={{{captionlines|2}}}|next={{{3|}}}|result={{{result|}}}}}}}<!--
+
-->{{#if: {{{image 2e|}}}|{{Lead/GalleryItem|image={{{image 2e|}}}|caption={{{caption 2e|}}}|width={{{image 2e width|{{{images 2 width|180}}}}}}|height={{{image 2e height|{{{images 2 height|180}}}}}}|resize={{{images 2 resize|1}}}|lines={{{captionlines|2}}}|next={{{3|}}}|result={{{result|}}}}}}}<!--
-->{{#if: {{{imageX6|}}}|{{Lead/GalleryItem|image={{{imageX6|}}}|caption={{{captionX6|}}}|width={{{imagewidthX6|{{{imagesXwidth|180}}}}}}|height={{{imageheightX6|{{{imagesXheight|180}}}}}}|resize={{{resizeXimages|1}}}|lines={{{captionlines|2}}}|next={{{3|}}}|result={{{result|}}}}}}}<!--
+
-->{{#if: {{{image 2f|}}}|{{Lead/GalleryItem|image={{{image 2f|}}}|caption={{{caption 2f|}}}|width={{{image 2f width|{{{images 2 width|180}}}}}}|height={{{image 2f height|{{{images 2 height|180}}}}}}|resize={{{images 2 resize|1}}}|lines={{{captionlines|2}}}|next={{{3|}}}|result={{{result|}}}}}}}<!--
-->{{#if: {{{imageX7|}}}|{{Lead/GalleryItem|image={{{imageX7|}}}|caption={{{captionX7|}}}|width={{{imagewidthX7|{{{imagesXwidth|180}}}}}}|height={{{imageheightX7|{{{imagesXheight|180}}}}}}|resize={{{resizeXimages|1}}}|lines={{{captionlines|2}}}|next={{{3|}}}|result={{{result|}}}}}}}<!--
+
-->{{#if: {{{image 2g|}}}|{{Lead/GalleryItem|image={{{image 2g|}}}|caption={{{caption 2g|}}}|width={{{image 2g width|{{{images 2 width|180}}}}}}|height={{{image 2g height|{{{images 2 height|180}}}}}}|resize={{{images 2 resize|1}}}|lines={{{captionlines|2}}}|next={{{3|}}}|result={{{result|}}}}}}}<!--
-->{{#if: {{{imageX8|}}}|{{Lead/GalleryItem|image={{{imageX8|}}}|caption={{{captionX8|}}}|width={{{imagewidthX8|{{{imagesXwidth|180}}}}}}|height={{{imageheightX8|{{{imagesXheight|180}}}}}}|resize={{{resizeXimages|1}}}|lines={{{captionlines|2}}}|next={{{3|}}}|result={{{result|}}}}}}}<!--
+
-->{{#if: {{{image 2h|}}}|{{Lead/GalleryItem|image={{{image 2h|}}}|caption={{{caption 2h|}}}|width={{{image 2h width|{{{images 2 width|180}}}}}}|height={{{image 2h height|{{{images 2 height|180}}}}}}|resize={{{images 2 resize|1}}}|lines={{{captionlines|2}}}|next={{{3|}}}|result={{{result|}}}}}}}<!--
-->{{#if: {{{imageX9|}}}|{{Lead/GalleryItem|image={{{imageX9|}}}|caption={{{captionX9|}}}|width={{{imagewidthX9|{{{imagesXwidth|180}}}}}}|height={{{imageheightX9|{{{imagesXheight|180}}}}}}|resize={{{resizeXimages|1}}}|lines={{{captionlines|2}}}|next={{{3|}}}|result={{{result|}}}}}}}<!--
+
-->{{#if: {{{image 2i|}}}|{{Lead/GalleryItem|image={{{image 2i|}}}|caption={{{caption 2i|}}}|width={{{image 2i width|{{{images 2 width|180}}}}}}|height={{{image 2i height|{{{images 2 height|180}}}}}}|resize={{{images 2 resize|1}}}|lines={{{captionlines|2}}}|next={{{3|}}}|result={{{result|}}}}}}}<!--
 
--></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 =<!--  
 
   -->| smooth =<!--  
Line 87: Line 87:
 
   -->{{#sgallery: width=320 | height=240
 
   -->{{#sgallery: width=320 | height=240
 
| imagelist={{
 
| imagelist={{
   #if: {{{imageX1|}}} | {{{imageX1|}}}{{!}}{{{captionX1|}}} }}
+
   #if: {{{image 2a|}}} | {{{image 2a|}}}{{!}}{{{caption 2a|}}} }}
{{#if: {{{imageX2|}}} | {{{imageX2|}}}{{!}}{{{captionX2|}}} }}
+
{{#if: {{{image 2b|}}} | {{{image 2b|}}}{{!}}{{{caption 2b|}}} }}
{{#if: {{{imageX3|}}} | {{{imageX3|}}}{{!}}{{{captionX3|}}} }}
+
{{#if: {{{image 2c|}}} | {{{image 2c|}}}{{!}}{{{caption 2c|}}} }}
{{#if: {{{imageX4|}}} | {{{imageX4|}}}{{!}}{{{captionX4|}}} }}
+
{{#if: {{{image 2d|}}} | {{{image 2d|}}}{{!}}{{{caption 2d|}}} }}
{{#if: {{{imageX5|}}} | {{{imageX5|}}}{{!}}{{{captionX5|}}} }}
+
{{#if: {{{image 2e|}}} | {{{image 2e|}}}{{!}}{{{caption 2e|}}} }}
{{#if: {{{imageX6|}}} | {{{imageX6|}}}{{!}}{{{captionX6|}}} }}
+
{{#if: {{{image 2f|}}} | {{{image 2f|}}}{{!}}{{{caption 2f|}}} }}
{{#if: {{{imageX7|}}} | {{{imageX7|}}}{{!}}{{{captionX7|}}} }}
+
{{#if: {{{image 2g|}}} | {{{image 2g|}}}{{!}}{{{caption 2g|}}} }}
{{#if: {{{imageX8|}}} | {{{imageX8|}}}{{!}}{{{captionX8|}}} }}
+
{{#if: {{{image 2h|}}} | {{{image 2h|}}}{{!}}{{{caption 2h|}}} }}
{{#if: {{{imageX9|}}} | {{{imageX9|}}}{{!}}{{{captionX9|}}} }}
+
{{#if: {{{image 2i|}}} | {{{image 2i|}}}{{!}}{{{caption 2i|}}} }}
 
}}{{
 
}}{{
 
#if:{{{imagesfooter|}}}|<div style="text-align:right; font-size:80%; line-height:1em;">{{{imagesfooter}}}</div><!--
 
#if:{{{imagesfooter|}}}|<div style="text-align:right; font-size:80%; line-height:1em;">{{{imagesfooter}}}</div><!--
Line 104: Line 104:
 
// 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: {{{image1|}}}<!-- at least 1 sidebar image present,  
+
</table></td><td>{{#if: {{{image 1a|}}}<!-- at least 1 sidebar image present,  
// START RIGHT SIDEBAR IMAGE CONTENT, up to 4 images, non-wrapping, Lead/GalleryItemNoCaption creates td!
+
// START RIGHT SIDEBAR IMAGE CONTENT,  
 +
// up to 4 images, non-wrapping, Lead/GalleryItemNoCaption creates td!
 +
// image 1a - 1d,  caption 1a - 1d
 +
// image 1a - 1d width, images 1 width
 +
// image width height, images 1 height
 +
// 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: {{{image1|}}}|{{Lead/GalleryItemNoCaption|image={{{image1|}}}|caption={{{caption1|}}}|width={{{imagewidth1|{{{imagewidth|100}}}}}}|height={{{imageheight1|{{{imagesheight|100}}}}}}|resize={{{resizeimages|1}}}|next={{{3|}}}|result={{{result|}}}}}}}<!--
+
-->{{#if: {{{image 1a|}}}|{{Lead/GalleryItemNoCaption|image={{{image 1a|}}}|caption={{{caption 1a|}}}|width={{{image 1a width|{{{images 1 width|100}}}}}}|height={{{image 1a height|{{{images 1 height|100}}}}}}|resize={{{images 1 resize|1}}}|next={{{3|}}}|result={{{result|}}}}}}}<!--
-->{{#if: {{{image2|}}}|{{Lead/GalleryItemNoCaption|image={{{image2|}}}|caption={{{caption2|}}}|width={{{imagewidth2|{{{imagewidth|100}}}}}}|height={{{imageheight2|{{{imagesheight|100}}}}}}|resize={{{resizeimages|1}}}|next={{{3|}}}|result={{{result|}}}}}}}<!--
+
-->{{#if: {{{image 1b|}}}|{{Lead/GalleryItemNoCaption|image={{{image 1b|}}}|caption={{{caption 1b|}}}|width={{{image 1b width|{{{images 1 width|100}}}}}}|height={{{image 1b height|{{{images 1 height|100}}}}}}|resize={{{images 1 resize|1}}}|next={{{3|}}}|result={{{result|}}}}}}}<!--
-->{{#if: {{{image3|}}}|{{Lead/GalleryItemNoCaption|image={{{image3|}}}|caption={{{caption3|}}}|width={{{imagewidth3|{{{imagewidth|100}}}}}}|height={{{imageheight3|{{{imagesheight|100}}}}}}|resize={{{resizeimages|1}}}|next={{{3|}}}|result={{{result|}}}}}}}<!--
+
-->{{#if: {{{image 1c|}}}|{{Lead/GalleryItemNoCaption|image={{{image 1c|}}}|caption={{{caption 1c|}}}|width={{{image 1c width|{{{images 1 width|100}}}}}}|height={{{image 1c height|{{{images 1 height|100}}}}}}|resize={{{images 1 resize|1}}}|next={{{3|}}}|result={{{result|}}}}}}}<!--
-->{{#if: {{{image4|}}}|{{Lead/GalleryItemNoCaption|image={{{image4|}}}|caption={{{caption4|}}}|width={{{imagewidth4|{{{imagewidth|100}}}}}}|height={{{imageheight4|{{{imagesheight|100}}}}}}|resize={{{resizeimages|1}}}|next={{{3|}}}|result={{{result|}}}}}}}<!--
+
-->{{#if: {{{image 1d|}}}|{{Lead/GalleryItemNoCaption|image={{{image 1d|}}}|caption={{{caption 1d|}}}|width={{{image 1d width|{{{images 1 width|100}}}}}}|height={{{image 1d height|{{{images 1 height|100}}}}}}|resize={{{images 1 resize|1}}}|next={{{3|}}}|result={{{result|}}}}}}}<!--
 
--></tr></table>
 
--></tr></table>
 
}}</td></tr></includeonly>
 
}}</td></tr></includeonly>

Revision as of 17:43, 6 July 2009

Version 1.9: Collapsible/collapsed added, lead images in right sidebar

Maximum in right side bar is 4; they will always be side-by-side, (no wrapping).

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 Lead/RowStart 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.

Changes in recent versions

(The main documentation for all parts of the single-access key is under Template:Key Start/doc!)

[Collapse]

Version 3.9.

  • comments changed, partly refactored
  • removed the br in front of the resultqualifier if sidebar image a etc. present
  • result layout variants better integrated to save memory
  • general minor optimizations
  • next-lead-pointer (number on right side) now always in same row as statement, even if results are also present
[Expand]

Version 3.8.

[Expand]

Version 3.7.

[Collapse]Version 3.3:
  • added scientific name and new layout for result
[Expand]Version 3.2:

Additional- and subtemplates

Lead
 ├ Lead/SplitNumberLead/InnerLead/docLead/GalleryItemLead/GalleryItemNoCaption
 + Template: StripFormatting to get just text
 + Template: Pixel2Number eg. 300px → 300


Technical Documentation

Lead/Inner produces a table row with 6 <td>

Legend:
tr#something → id="something"
td.something → class="something"
{something}  → {{{something}}}
[something]  → optional
‹1-2›        → colspan

┌ tr#L{keyID}_{leadID}_{decisiontreeAlternative}_row ───────────────────┐
│  [td] ┬ if {parentlead}                                               │
│  [td] ┘                                                               │
│  td.dt-nodeid                                                         │
└───────────────────────────────────────────────────────────────────────┘

┌ tr.dt-subheading ─────────────────────────────────────────────────────┐
└───────────────────────────────────────────────────────────────────────┘

┌  tr.dt-row#L{keyID}_{leadID}_row ─────────────────────────────────────┐
│   [td] ┬ if {parentlead}                                              │
│   [td] ┘                                                              │
│   td.dt-nodeid#L{keyID}_{leadID}                                      │
│   td.leadalt                                                          │
│ ┌ td.lead-row1 ─────────────────────────────────────────────────────┐ │
│ │  table.nested                                                     │ │
│ │  ├ tr                                                             │ │
│ │  │  td.leadtext span.leadspan                                     │ │   │   │ ► │
│ │  │  [td.leadresult span.leadon]                                   │ │   
│ │  ├ tr                                                             │ │
│ │  │  td.leadresult                                                 │ │   │       │
│ │  │     span.commonnames                                           │ │
│ │  │     span.leadresults                                           │ │
│ │  │       span.leadout                                             │ │
│ │  │       span.resultqualifier                                     │ │
│ │  │     span.leadon                                                │ │
│ │  ├ tr                                                             │ │
│ │  │  th.leaderror                                                  │ │   │       │
│ │  └ tr                                                             │ │
│ │     td.leadextras                                                 │ │   │       │
│ │       div.leadextras[.mw-collapsible]                             │ │
│ │         table                                                     │ │
│ │          tr                                                       │ │
│ │           table (containing image m,n,o,p,q,r) → Lead/GalleryItem │ │
│ │  table.nested                                                     │ │
│ │  └ tr                                                             │ │
│ │     td                                                            │ │
│ │       div (float:left) image j,k                                  │ │
│ └───────────────────────────────────────────────────────────────────┘ │
│   td                                                                  │
│    table                                                              │
│    tr                                                                 │
│      td (containing image a,b,c,d,e) → Lead/GalleryItemNoCaption      │
│        div.overlaywrapper                                             │
│          div.overlaylabel                                             │
└───────────────────────────────────────────────────────────────────────┘   

Notes:

1. 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.

2. 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: decisiontreeID}}" (here, in Lead itself and Lead/SplitNumber).

3. Temporarily, the template supports two versions for formatting results, depending on whether Scientific Name is present (new) or not (old). If most keys have a scientific name, then the old version may be dropped. Please attempt to create all new keys for the new format!

 ############### NEW OLD RESULT layout rules: ####################
 // ? scientificname
 // yes: (new layout format)
 //    ? resulttext
 //    yes: resulttext [, resultlink] [, next]
 //    no :
 //        ? commonnames
 //        yes: commonnames - scientificname [, next]
 //        no : scientificname [, next]
 // no : (old layout)
 //    ? commonnames
 //    yes: commonnames
 //        ? resulttext
 //        yes: commonnames - resulttext [, resultlink] [, next]
 //        no : commonnames [, next]
 // Note: [, next] can appear in all layout variants
 ############################################################