Template:Itemlist/doc
Jump to navigation
Jump to search
Create a responsive items list.
You can use {{itemlist/options}} to change default value for option parameters.
Usage
Parameters:
- All Unamed parameters: contents of every list item.
- optional width: item width, accept any css width, default is 10em.
- optional class: css class(es).
- optional id: id attribute.
- optional css or style: custom css rules applied to list items.
- optional boxcss or boxstyle: custom css rules applied to wrapper box.
Example
{{itemlist |{{item|Bucket}} |{{item|Bottomless Water Bucket}} |{{item|Super Absorbant Sponge}} |{{item|Bug Net|size=30px}} |{{item|Golden Bug Net|size=28px}} |{{item|Breathing Reed|size=30px}} |{{item|Sickle|size=30px}} |{{item|Binoculars}} |{{item|Portal Gun|size=30px}} |{{item|Money Trough|size=30px}} }}
will result:
- Bucket
- Bottomless Water Bucket(Desktop, Console and Mobile versions)
- Super Absorbant Sponge(Desktop, Console and Mobile versions)
- Bug Net
- Golden Bug Net(Desktop, Console and Mobile versions)
- Breathing Reed
- Sickle
- Binoculars
- Portal Gun(Desktop, Console and Mobile versions)
- Money Trough(Desktop, Console and Mobile versions)
{{itemlist|width=18em|class=terraria |{{item|Bucket}} |{{item|Bottomless Water Bucket}} |{{item|Super Absorbant Sponge}} |{{item|Bug Net|size=30px}} |{{item|Golden Bug Net|size=28px}} |{{item|Breathing Reed|size=30px}} |{{item|Sickle|size=30px}} |{{item|Binoculars}} |{{item|Portal Gun|size=30px}} |{{item|Money Trough|size=30px}} }}
will result:
- Bucket
- Bottomless Water Bucket(Desktop, Console and Mobile versions)
- Super Absorbant Sponge(Desktop, Console and Mobile versions)
- Bug Net
- Golden Bug Net(Desktop, Console and Mobile versions)
- Breathing Reed
- Sickle
- Binoculars
- Portal Gun(Desktop, Console and Mobile versions)
- Money Trough(Desktop, Console and Mobile versions)
{{itemlist|width=30em |{{item|Bucket}} |{{item|Bottomless Water Bucket}} |{{item|Super Absorbant Sponge}} |{{item|Bug Net|size=30px}} |{{item|Golden Bug Net|size=28px}} |{{item|Breathing Reed|size=30px}} |{{item|Sickle|size=30px}} |{{item|Binoculars}} |{{item|Portal Gun|size=30px}} |{{item|Money Trough|size=30px}} }}
will result:
- Bucket
- Bottomless Water Bucket(Desktop, Console and Mobile versions)
- Super Absorbant Sponge(Desktop, Console and Mobile versions)
- Bug Net
- Golden Bug Net(Desktop, Console and Mobile versions)
- Breathing Reed
- Sickle
- Binoculars
- Portal Gun(Desktop, Console and Mobile versions)
- Money Trough(Desktop, Console and Mobile versions)
{{itemlist|width=15em|boxcss=line-height: 3 |{{item|Bucket}} |{{item|Bottomless Water Bucket}} |{{item|Super Absorbant Sponge}} |{{item|Bug Net|size=30px}} |{{item|Golden Bug Net|size=28px}} |{{item|Breathing Reed|size=30px}} |{{item|Sickle|size=30px}} |{{item|Binoculars}} |{{item|Portal Gun|size=30px}} |{{item|Money Trough|size=30px}} }}
will result:
- Bucket
- Bottomless Water Bucket(Desktop, Console and Mobile versions)
- Super Absorbant Sponge(Desktop, Console and Mobile versions)
- Bug Net
- Golden Bug Net(Desktop, Console and Mobile versions)
- Breathing Reed
- Sickle
- Binoculars
- Portal Gun(Desktop, Console and Mobile versions)
- Money Trough(Desktop, Console and Mobile versions)
There is another API style, it's more easier to use with DPL/cargo:
{{itemlist/start|width=20em}} {{itemlist/item|{{item|Bucket}} }} {{itemlist/item|{{item|Bottomless Water Bucket}} }} {{itemlist/item|{{item|Super Absorbant Sponge}} }} {{itemlist/item|{{item|Bug Net|size=30px}} }} {{itemlist/end}}
will result:
- Bucket
- Bottomless Water Bucket(Desktop, Console and Mobile versions)
- Super Absorbant Sponge(Desktop, Console and Mobile versions)
- Bug Net
All parameters of {{itemlist}} are available on {{itemlist/start}}, and every list item can also define their own css:
{{itemlist/start}} {{itemlist/item|{{item|Bucket}}|css=border:1px solid red}} {{itemlist/item|{{item|Bottomless Water Bucket}} }} {{itemlist/item|{{item|Super Absorbant Sponge}} }} {{itemlist/item|{{item|Bug Net|size=30px}}|css=border:2px dotted blue}} {{itemlist/end}}
will result:
- Bucket
- Bottomless Water Bucket(Desktop, Console and Mobile versions)
- Super Absorbant Sponge(Desktop, Console and Mobile versions)
- Bug Net