Open main menu

Changes

Template:Infobox/doc

6,889 bytes added, 21:00, 19 January 2010
m
Reverted 3 edits by Keanu217 identified as vandalism to last revision by Ludwigs2. using TW
== Cheap Food for Hard Times =={{documentation subpage}}<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE. -->
This template is intended as a meta-template: a template used for constructing other templates. it is not meant for use directly in an article, but can be used on a one-off basis if required. See [[FileHelp:cheapfoodforhardtimesInfobox]] for an introduction to infoboxes and information on how to design them.jpgSee [[:Category:Infobox templates]]for specific infobox templates.
In this day with the economy in the state it === Usage ===Usage is similar to {{tl|navbox}}, we are all suffering to make ends meet and put food but with an additional distinction. Each row on the table. Existence seems to can either be more a battle of basic survival for many families"header", living paycheck to paycheck. We or it can have become a nation of experts at juggling the billslabel/data pair, or it can just be a data cell. These are mutually exclusive states so if you know the story define a row to be both a header and a label/data pair, pay one or two and put the rest on the back burner till next payday. The bottom line label/data pair is that really doesn't leave much money leftover for the food budgetoverridden.
I've noticed a really interesting trend amongst your local food vendor for awhile now. Have you become aware of the fact Note that when if you find some food item that you can buy for cheap and put together a real cheap meal that is healthy and nutritious that somehow want to insert an image elsewhere other than the grocer gets wind top of it and the next time you go shopping the price of infobox, or insert other "freeform" data, using a row with just a "data" field allows for that item has gone up. Its makes life a little harder and challenging to keep ahead sort of the price increases at the local marketthing.
In order to surviveWhen developing an infobox, I've put together it is often a few recipes that are delicious good idea to use non-contiguous numbers for the header and nutritious labal/data rows. for example:<pre>|header3 = Section 1|label5 = XXX|data5= YYY|label7 = QQQ|data7 = RRR|header10 = Section2|label12 = AAA|data12 = BBB</pre>Header and won't break your food budgetlabal/data rows are not shown if they have no data, so this construction renders nicely but allows for easy revision and expansion of the kids enjoy them as well.I figure also that if you might have a favorite recipe that you put together it would template, since new rows can be great to have you share it with added without renumbering all the rest of the world . Many times by combining very simple ingredients you have leftover remaining rows in the cupboards you can come up with some real winnerstemplate. Here is one of my favorite recipes that is both Nutritious and delicious: '''Delicious Dinner Idea | Brown Rice Roast Beef & Vegetables'''
This recipe sticks === Parameters =======View/discuss/edit links====;name : The template page name that the "view/discuss/edit" links should point to the ribs on a cold winters day. This You can use <nowiki>{{subst:PAGENAME}}</nowiki>. If this parameter is really tasty addition to anyones weekly menu lineupomitted the view/discuss/edit links will not be displayed.
1. Some useful cooking supplies to have on hand , is a rice steamer with multiple steam trays. [[File:cheapfoodforhardtimes_.jpg]]====Title===={{Infobox|title = Text in caption over infobox|subheader = Subheader of the infobox|data1 = (the rest of the infobox goes here)}}{{Infobox|above = Text in uppermost cell of infobox|subheader = Subheader of the infobox|subheader2 = 2<sup>nd</sup> subheader of the infobox|data1 = (the rest of the infobox goes here)}}
2There are two different ways to put a title on an infobox. A Large boiling pot One contains the title inside the infobox's border, such the other puts it on top as for boiling noodlesa caption. You can use both of them together if you like, or just one or the other, or even neither (though this is not recommended).;title : Text to put in the caption over top of the table.;above : Text to put within the uppermost cell of the table.
3====Optional content====;subheader, subheader2 : additional title fields which fit between {{{title}}} and {{{above}}}.;image, image2 : images to display at the top of the template. Use full image syntax, for example <nowiki>[[File:example.png|200px|alt=Example alt text]]</nowiki>. Image is centered by default. See [[WP:ALT]] for more on alt text.;caption1, caption2 : Text to put underneath the images.;header(n) : Text to use as a header in row n.;label(n): Text to use as a label in row n.;data(n): Text to display as data in row n.;below: Text to put in the bottom cell. The bottom cell is intended for footnotes, see-also, and other such information. Roast Beef Chuck Roast
4Note: currently, headers, labels and data items with the same n-value are mutually exclusive; only the header will be displayed. 2 Stalks See the rendering of celeryheader4, label4, and data4 in the examples section below.
5====Optional CSS styling====;bodystyle : Applies to the infobox table as a whole;titlestyle : Applies only to the title caption. half Adding a bag background color is usually inadvisable since the text is rendered "outside" the infobox.;abovestyle : Applies only to the "above" cell at the top. The default style has font-size:large; since this cell is usually used for a title, if you want to use the above cell for regular-sized text include "font-size:medium;" in the abovestyle.;imagestyle : Applies to the cell the image is in. This includes the text of your 1 lb bag the image caption, but you should set text properties with captionstyle instead of brown riceimagestyle in case the caption is moved out of this cell in the future.;captionstyle : Applies to the text of the image caption.;headerstyle : Applies to all header cells;labelstyle : Applies to all label cells;datastyle : Applies to all data cells;belowstyle : Applies only to the below cell
6==== HTML classes ====;bodyclass : This parameter is inserted into the "class" attribute for the infobox as a whole.;titleclass : This parameter is inserted into the "class" attribute for the infobox's title caption.;aboveclass : This parameter is inserted into the "class" attribute for the infobox's "above" cell.; aboverowclass : This parameter is inserted into the "class" attribute for the complete table row the "above" cell is on.; subheaderclass : This parameter is inserted into the "class" attribute for the infobox's subheader.; subheaderrowclass : This parameter is inserted into the "class" attribute for the complete table row the subheader is on.;imageclass : This parameter is inserted into the "class" attribute for the image; it is in particular used in conjunction with {{tl|Image class names}}.; imagerowclass1, imagerowclass1 : These parameters are inserted into the "class" attribute for the complete table row the respective images are on.;rowclass(n) : This parameter is inserted into the "class" attribute for the specified row '''including''' the label or other explanatory text.;class(n) : This parameter is inserted into the "class" attribute for the data cell of the specified row. If there's no data cell it has no effect.;belowclass : This parameter is inserted into the "class" attribute for the infobox's below cell. 1 large Chinese bitter Melon
7. garlic powder==== Microformats ====
8This template supports the addition of microformat information. saltThis is done by adding "class" attributes to various data cells, indicating what kind of information is contained within. To flag an infobox as containing [[hCard]] information, for example, add the following parameter:
9. pepper<pre>|bodyclass = vcard</pre>
10. celery saltAnd for each row containing a data cell that's part of the vcard, add a corresponding class parameter:
11. curry powder<pre>|class1 = fn|class2 = org|class3 = tel</pre>
12. oregano..and so forth. "above" and "title" can also be given classes, since these are usually used to display the name of the subject of the infobox.
13See [[Wikipedia:WikiProject Microformats]] for more information on adding microformat information to Wikipedia, and [[microformat]] for more information on microformats in general. Chinese lite soy sauce
14===Making fields optional===A row with a label but no data is not displayed. 1 lb baby carrotsThis allows for the easy creation of optional infobox content rows. To make a row optional use a parameter that defaults to an empty string, like so:
15. 1<pre>|label5 = Population|data5 = {{{population|}}}</2 diced onionpre>
16This way if an article doesn't define the population parameter in its infobox the row won't be displayed. cilantro
17For more complex fields with pre-formated contents that would still be present even if the parameter wasn't set, you can wrap it all in an "#if" statement to make the whole thing vanish when the parameter is not used. small teaspoon of meat tenderizerFor instance, the "#if" statement in the following example reads "#if:the parameter ''mass'' has been supplied |then display it, followed by 'kg'":
You start with a chuck roast, which you boil in the bottom of the rice steam pot and you boil it till done usually about 1.5 hours on medium heat.<pre>|label6 = MassNext your going to dice up the celery and put in the bottom pan with the roast. |data6 In addition you want to slice the bitter melon in half and than= {{#if:{{{mass|}}}|{{{mass}}} kg}} slice into small pieces and place these bottom . Throw in the carrots and seasonings, to suit your palate.</pre>
Now meanwhileFor more on #if, at the same time that you put the Roast and vegetables to cook also in the larger boiling pot you measure out half of the 2 lb bag into the pot. Taker your index finger and measure the depth of the rice in the pan. Than by looking at how far your rice depth measures up finger, you want to put in 1 and a half times as much water in the rice pansee [[meta:ParserFunctions##if:|here]].
You start the rice out on high heat and than once its reached can also make headers optional in a similar way. If you want a header to appear only if one or more of the boiling point you turn data fields that fall under it are filled, one could use the heat down following pattern as an example of how to medium low heat.do it:
Than once the rice is done and the Roast and vegetables are cooked , than you combine everything in the large already cooked rice pot with the rice <pre style="overflow:auto;">{{Infoboxin there as well.|name = {{subst:PAGENAME}}|title = Example of an optional headerIt is at this time that this time that you are going to start to season the soup, I usually season to my taste, and put soy sauce at least a few shakes|header1 = {{#if:{{{item_one|}}}{{{item_two|}}}{{{item_three|}}}|Optional header}}|label2 for flavor. In addition , I add alot of garlic powder, salt , pepper, oregano , a little curry powder , and the celery salt and in this case a little= Item one|data2 = {{{item_one|}}}|label3 meat tenderizer (no msg) for the roast .= Item twoOnce the meat is done don't forget to cut the meat up into small bite size chunks.|data3 = {{{item_two|}}}One thing not to forget is after the roast is done you want to make sure to take the broth that is created with the boiled |label4 roast and it is added into the pot.= Item three|data4 = {{{item_three|}}} This is your soup base.}}</pre>
Now the easy part kick back for about 20 minutes and allow the soup ingredients to blend and cook down header1 will be shown if any of item_one, which intensifies the flavor. This makes enough to easily feed a family of 4item_two, or if you like it gets better with each day as leftoversitem_three is defined. I usually eat mine for about at least about 5 days for lunch and dinner.Enjoy and please let me know how you like itIf none of the three parameters are defined the header won't be shown.
The trick to this is that the "if" returns false only if there is nothing whatsoever in the conditional section, so only if all three of item_one, item_two and item_three are undefined will the if statement fail.
This recipe is by far one of my favorites. It is really gtood for warming you up on a cold winters day. I also find it gives you alot of strength to get===Examples=== things done during the week, such as work and enough energy to last.{{Infobox|name = Infobox/doc|bodystyle = |title = Test Infobox|titlestyle =
1. Some useful cooking supplies to have on hand , is a rice steamer with multiple steam trays|image = [[File:example.png|200px|alt=Example alt text]]|imagestyle = 2. A Large boiling pot , such as |caption = Caption for boiling noodles. 3. Three chicken breastsexample.png 4. 2 Stalks of celery|captionstyle = 5. half a bag of your 1 lb bag of brown rice|headerstyle = background:#ccf; 6. 1 large Chinese bitter Melon 7. garlic powder|labelstyle = background:#ddf;|datastyle 8. salt 9. pepper 10. celery salt 11. curry powder 12. oregano 13. Chinese lite soy sauce=
You start with |header1 = Header defined alone|label1 = |data1 = |header2 = |label2 = Label defined alone|data2 = |header3 =|label3 = |data3 = Data defined alone|header4 = All three chicken breasts, which you put in the bottom of the rice steam pot and you boil them till done usually about 25 minutes atdefined (header)|label4 the most on high heat.= All three defined (label)|data4 = All three defined (data)|header5 =Next your going to dice up the celery |label5 = Label and cut the cauliflower into large chunks. and place these into the steamer trays. You put butter on data defined (label)the cauliflower along with some garlic powder, than cover the steamer lid |data5 = Label and let it steam while the chicken is cooking.data defined (data)
Now meanwhile, at the same time that you put the chicken and vegetables to cook also in the larger boiling pot you measure out half of the|belowstyle = background:#ddf; 2 lb bag into the pot. Taker your index finger and measure the depth of the rice in the pan. Than by looking at how far your rice |below = Below text up on your finger, you want to put in 1 and a half times as much water in the rice pan.You start the rice out on high heat and than once its reached the boiling point you turn the heat down to medium low heat.}}
Than once the rice is done and the chicken and vegetables are cooked , than you combine everything in the large already cooked rice pot with <pre style="overflow:auto">{{Infoboxthe rice in there as well.|name = Infobox/docIt is at this time that this time that you are going to start to season the soup, I usually season to my taste, and put soy sauce at least a |bodystyle = few shakes for flavor. In addition , I add a lot of garlic powder, salt , pepper, oregano , a little curry powder , and the celery salt.|title = Test Infobox|titlestyle =
For more great money saving and delicious recipes check out |image = [http[File://wwwexample.cheapfoodforhardtimespng|200px|alt=Example alt text]]|imagestyle = |caption = Caption for example.com Cheap Food for Hard Times]png|captionstyle = |headerstyle = background:#ccf;|labelstyle = background:#ddf;|datastyle =
[[User:Keanu217|Keanu217]] header1 = Header defined alone|label1 = |data1 = |header2 = |label2 = Label defined alone|data2 = |header3 =|label3 = |data3 = Data defined alone|header4 = All three defined ([[User talk:Keanu217#topheader)|talk]]label4 = All three defined (label) 20:21, 19 January 2010 |data4 = All three defined (data)|header5 =|label5 = Label and data defined (label)|data5 = Label and data defined (UTCdata)
|belowstyle = background:#ddf;
|below = Below text
}}</pre>
Notice how when a label is defined without an accompanying data cell the row doesn't appear in the displayed infobox, and when a header is defined on the same row as a data cell the header takes precedence.
{{refbeginclear}}httpFor this example, {{nowrap|bodystyle &#0061; width:20em;}} and {{nowrap|labelstyle &#0061; width:33%;}} {{Infobox|bodystyle = width:20em;|name = Infobox/doc|title = Test Infobox|titlestyle = |headerstyle = |labelstyle = width:33%|datastyle =  |header1 = |label1 = Label 1|data1 = Data 1|header2 = |label2 = Label 2|data2 = Data 2|header3 = |label3 = Label 3|data3 = Data 3|header4 = Header 4|label4 = |data4 = |header5 = |label5 = Label 5|data5 = Data 5: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. |belowstyle = |below = Below text}} {{clear}} === Full blank syntax ===(Note: the template currently handles up to 80 rows; only 20 are included here since infoboxes larger than that will be relatively rare. Just extend the numbering as needed. The microformat "class" parameters are also omitted as they are not commonly used.) <pre style="overflow:auto;">{{Infobox|name = {{subst:PAGENAME}}|bodystyle = |title = |titlestyle = |above = |abovestyle =  |imagestyle = |captionstyle =  |image = |caption = |image2 = |caption2 =  |headerstyle = |labelstyle = |datastyle =  |header1 = |label1 = |data1 = |header2 = |label2 = |data2 = |header3 = |label3 = |data3 = |header4 = |label4 = |data4 = |header5 = |label5 = |data5 = |header6 = |label6 = |data6 = |header7 = |label7 = |data7 = |header8 = |label8 = |data8 = |header9 = |label9 = |data9 = |header10 = |label10 = |data10 = |header11 = |label11 = |data11 = |header12 = |label12 = |data12 = |header13 = |label13 = |data13 = |header14 = |label14 = |data14 = |header15 = |label15 = |data15 = |header16 = |label16 = |data16 = |header17 = |label17 = |data17 = |header18 = |label18 = |data18 = |header19 = |label19 = |data19 = |header20 = |label20 = |data20 =  |belowstyle =|below = }}</www.cheapfoodforhardtimespre> === Porting to other MediaWikis ===The infobox template requires the tidy extension to be installed, and may not work with other MediaWikis the [[WP:TRAN]] has a version of Infobox that has been modified to work on other MediaWikis.com === See also ===* {{refendtl|start infobox page}} <includeonly>[[Category:Infobox templates| ]][[Category:Templates generating microformats]][[Category:Wikipedia metatemplates|Infobox]] [[ar:قالب:قالب معلومات]][[be-x-old:Шаблён:Infobox]][[bg:Шаблон:Infobox]][[bs:Šablon:Infokutija]][[cs:Šablona:Infobox]][[da:Skabelon:Infoboks-en]][[de:Vorlage:Infobox]][[et:Mall:Infobox]][[eo:Ŝablono:Informkesto]][[es:Plantilla:Ficha]][[fa:الگو:دادان]][[fr:Modèle:Infobox]][[hsb:Předłoha:Infokašćik]][[ia:Patrono:Infobox]][[os:Шаблон:Infobox]][[it:Template:Infobox]][[is:Snið:Infobox]][[mk:Шаблон:Infobox]][[no:Mal:Infoboks]][[ja:Template:Infobox]][[ko:틀:정보상자]][[ka:თარგი:ინფოდაფა]][[nn:Mal:Infoboks]][[pt:Predefinição:Infobox]][[ru:Шаблон:Карточка]][[sk:Šablóna:Infobox]][[sl:Predloga:Infopolje]][[sv:Mall:Infobox]][[th:แม่แบบ:กล่องข้อมูล]][[tr:Şablon:Infobox]][[uk:Шаблон:Картка]][[zh:Template:Infobox]]</includeonly>
Anonymous user