Template:Picture select
Look at the beautiful example!
See also: {{Picture select L}}, {{Picture select R}}, {{htab-box}}
Usage:
[编辑]{{picture select|[[File:img1.jpg|120px|The first image]]|[[File:Img2.png|120px|second image]]|and so on...}} or {{picture select| {{Image lead|..params}}| {{Image lead|..params}} }}
You can also use title<tab number>=foo, or a section header (==something==) to override the normal tab title (picture number). Since if any section headers are present, it is assumed each section represents a tab, so the headers are not displayed. If you want them displayed, please use the alternative syntax:
<h2 style="display:block">something</h2>
Example of overriding automatic tab numbering:
{{picture select|1= [[File:something.png]] |title1=2 |2= [[File:something else.png]] |title2=1 }}
Supports upto 200 pictures. Also supports an optional width (include units, defaults to 400px), noborder, and align parameter. Most common usage would be:
{{picture select |{{Image lead| |image_title= 2008 Taiwan Designers Week PI on Basket.jpg |image_text= Basket - PI on Basket, showed a critical issue on a trendy increase of global price index. |caption= At the Xinyi Public Assembly Hall in Taipei, Taiwan, the 2008 Taiwan Designers' Week showed topical phenomena on environment, modern lifestyle, current incident, and subculture. |credit= [[User:BrockF5|Rico Shen]] |full_story= 2008 Taiwan Designers' Week shows potential of innovations |size= 240 |image_alignment=center <!-- It shouldn't be changed because of main page layout! --> }} |{{Image lead| |image_title= 2008Taipei101RunUp EliteChampions.jpg |image_text= Thomas Dold & Jenny Li, Champions of 2008 Taipei 101 Run Up |caption= Thomas Dold (left) from Germany, and Jenny Li (right) from Taiwan, take the top honors at the 2008 Taipei 101 Run Up respectively in Men's and Women's Elite classes. |credit= [[User:BrockF5|Rico Shen]] |full_story=Jenny Li and Thomas Dold win the 2008 Taipei 101 Run Up |size=320 |image_alignment=center <!-- It shouldn't be changed because of main page layout! --> }} |{{Image lead| |image_title=Mays Island, Cedar Rapids, June 12 2008.jpg |image_text= Mays Island, Cedar Rapids, June 12 2008 |caption=Mays Island in Cedar Rapids, Iowa, during the flooding of 2008, taken from Interstate 380 at around 2:00 p.m. on June 12, 2008. Nearly all of downtown is submerged in water. |credit=Golbez |full_story=Floodwaters swamp Cedar Rapids, Iowa |size=320 |image_alignment=center <!-- It shouldn't be changed because of main page layout! --> }} |{{Image lead| |image_title=Opening Plenary - World Economic Forum on Africa 2008.jpg |image_text= Opening Plenary - World Economic Forum on Africa 2008 |caption=Leaders of various African countries met as part of the 2008 World Economic Forum on Africa. |credit=Eric Miller |full_story=<!--Article not published so full story commented out. Critics of Robert Mugabe speak at Africa World Economic Forum--> |size=320 |image_alignment=center <!-- It shouldn't be changed because of main page layout! --> }} }}
Which makes:
照片來源:Rico Shen
At the Xinyi Public Assembly Hall in Taipei, Taiwan, the 2008 Taiwan Designers' Week showed topical phenomena on environment, modern lifestyle, current incident, and subculture.
→全文/→存檔
照片來源:Rico Shen
Thomas Dold (left) from Germany, and Jenny Li (right) from Taiwan, take the top honors at the 2008 Taipei 101 Run Up respectively in Men's and Women's Elite classes.
→全文/→存檔
照片來源:Golbez
Mays Island in Cedar Rapids, Iowa, during the flooding of 2008, taken from Interstate 380 at around 2:00 p.m. on June 12, 2008. Nearly all of downtown is submerged in water.
→全文/→存檔
照片來源:Eric Miller
Leaders of various African countries met as part of the 2008 World Economic Forum on Africa.
→存檔
caveats and bugs
[编辑]- Maximum 200 (but if you need more, its a simple edit to this template)
- Headline (
==foo==
) support is confusing (this could be changed, ask me)- it Assumes that your headline is a title of a tab, so doesn't display
- use alternative syntax:
<h2 style="display:block">foo</h2>
(change the 2 to the number of equal signs you'd use in normal syntax) if you want a headline
- use alternative syntax:
- Makes it the title of the tab (as opposed to auto-numbering)
- use a title<number>=picture_numb if you want to override other labeling of tabs
- it Assumes that your headline is a title of a tab, so doesn't display
The max 200 tabs is a limit to this template, not the tab system, and can be expanded as needed. I don't consider that an issue. The tab title issues are problems with adapting the tabber code to the wiki. They require minnor changes to js (I should get around to fixing them sometime soon). In the meanwhile i don't think it will be an issue.
Note: tab title is determined by:
- title<tab number>=something parameter of template (corresponding to title attribute of containing div)
- any section headers
- as last resort, automatically given a number (this is what is generally used)