Difference between revisions of "Template:Infobox:Header"
(Modified the behavior of the image.) |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly><table style="background-color: #F9F9F9; font-size: 95%; margin:0 0 0 0; width:100%;" cellpadding="0px" border="0px" cellspacing="0px"><tr><th style="background-color:#<!-- Title background color -->{{if|test={{{color|}}}|then={{{color}}}|else=FFFFFF}}; font-size: larger;"><!-- Title -->{{{title|ERROR HEADER TITLE}}}</th></tr><!-- Inclusion of the image -->{{if|test={{{image|}}}|then= | <includeonly><table style="background-color: #F9F9F9; font-size: 95%; margin:0 0 0 0; width:100%;" cellpadding="0px" border="0px" cellspacing="0px"><tr><th style="background-color:#<!-- Title background color -->{{if|test={{{color|}}}|then={{{color}}}|else=FFFFFF}}; font-size: larger;"><!-- Title -->{{{title|ERROR HEADER TITLE}}}</th></tr><!-- Inclusion of the image -->{{if|test={{{image|}}}|then= | ||
− | <tr><td style="padding:4px 0 0 0"><!-- Image and commentary -->[[Image:{{{image|IMAGE ERROR}}}|{{if|test={{{width|}}}|then={{{width}}}|else=250}}px]]{{if|test={{{comment|}}}|then=<br>{{{comment|COMMENT ERROR}}}|else=}}</td></tr>|else=}}<!-- Inclusion of additional content -->{{if|test={{{content|}}}|then= | + | <tr><td style="padding:4px 0 0 0"><!-- Image and commentary -->[[Image:{{{image|IMAGE ERROR}}}|{{if|test={{{resize|}}}|then={{{resize}}}|else={{if|test={{{width|}}}|then={{{width}}}|else=250}}}}px]]{{if|test={{{comment|}}}|then=<br>{{{comment|COMMENT ERROR}}}|else=}}</td></tr>|else=}}<!-- Inclusion of additional content -->{{if|test={{{content|}}}|then= |
− | <tr><td>{{{content|HEADER CONTENT ERROR}}}</td></tr>|else=}}</table></includeonly><noinclude>{{Doc}}[[Category:Meta-Templates|{{PAGENAME}}]] | + | <tr><td>{{{content|HEADER CONTENT ERROR}}}</td></tr>|else=}}</table></includeonly><noinclude>{{Doc}}[[Category:Meta-Templates|!{{PAGENAME}}]] |
</noinclude> | </noinclude> |
Latest revision as of 14:34, 11 December 2010
{{Infobox:Header}} is a meta-template, ie a template for creating templates. This template is intended to be used in line with the template Template:Infobox:Base. With this template you can create a table containing a title, an image with commentary and some additional content. You can set the background color for the title and the width of the image. ContentsUsagePut the following code in the template being designed. Complete the parameters you want, delete the unused. {{Infobox:Header | color = | width = | title = | image = | resize = | comment = | content = }} Parameters
Even if width and height are specified the image will keep its original aspect ratio: either the width or the height will be equal to the specified maximum, whichever allows the other to be <= the maximum.
You can complete the parameter content including other templates, such as Template:Infobox:Section and Template:Infobox:SectionList. But do not include other template Template:Infobox:Header in this parameter. This template is intended only to lead the table. ExamplesCopy and paste on a page to see the results. {{Infobox:Base | width = 200 | content = {{Infobox:Header | color = B8DB82 | width = 200 | title = Image of a basil | image = Albahaca basil.jpg | comment = Fresh basil leaves. }}}} {{Infobox:Base | width = 250 | content = {{Infobox:Header | color = ECBA71 | title = Table without image, just a title | comment = This comment is not showing. }}}} See also |