Multi row collapse

1. Create Portable Infobox template 
<infobox>
	<title source="title"><default>Unknown</default>	 
	<format>{{{title}}}{{#if:{{{subtitle|}}}|{{{subtitle}}}}}</format>
	</title>
	<image source="image"/>
	<label>imagecaption</label>
 <group layout="horizontal">
 <label>Removed from Game</label>
 </group>
<group>
 <header>Basics</header>
 <label>Type</label><default>Unknown</default>
 <label>Available</label><default>Unknown</default>
 <label>Upgradable</label>
 <label>Movable</label>
 <label>Size</label><default>Unknown</default>
</group>
<group layout="horizontal" collapse="closed">
 <header>Buying Price</header>
	
</group>
<group layout="horizontal" collapse="closed">
 <header>Slot Costs</header>
	
</group>
<group layout="horizontal">
	<header>Placement XP</header>
	{{{placement xp}}}
</group>
	 <group layout="horizontal">
	<header>Related</header>
	{{{related}}}
 </group>
</infobox>
2. Create template with variables
{{Infobox Structure DoF
 |title = {{{title|}}}
 |subtitle = {{{subtitle|}}}
 |image = {{{image|}}}
 |type = {{{type|}}}
 |available = {{{available|}}}
 |upgradable = {{{upgradable|}}}
 |movable = {{{movable|}}}
 |size = {{{size|}}}
 
 | buying price = {{#if: {{{buying price DoF 1-1|}}}|
{{{!}} width=100%; background:none; text-align:center;" align="center" cellspacing=0 cellpadding=0
 {{!}}-
 {{!}} {{#if: {{{buying price DoF 1-1|}}}| width=33% align=center style="padding:10px; border-right:1px solid #BFDAEB;" {{!}} First: {{{buying price DoF 1-1|}}} }}
 {{!}} {{#if: {{{buying price DoF 1-2|}}}| width=33% align=center style="padding:10px; border-right:1px solid #BFDAEB;" {{!}} Second: {{{buying price DoF 1-2|}}} }}
 {{!}} {{#if: {{{buying price DoF 1-3|}}}| width=33% align=center style="padding:10px;" {{!}} Third: {{{buying price DoF 1-3|}}} }}
 {{!}}-
 {{!}} {{#if: {{{buying price DoF 1-4|}}}| align=center style="padding:10px; border-top:1px solid #BFDAEB; border-right:1px solid #BFDAEB;" {{!}} Fourth: {{{buying price DoF 1-4|}}} }}
 {{!}} {{#if: {{{buying price DoF 1-5|}}}| align=center style="padding:10px; border-top:1px solid #BFDAEB; border-right:1px solid #BFDAEB;" {{!}} Fifth: {{{buying price DoF 1-5|}}} }}
 {{!}} {{#if: {{{buying price DoF 1-6|}}}| align=center style="padding:10px; border-top:1px solid #BFDAEB;" {{!}} Sixth: {{{buying price DoF 1-6|}}} }}
 {{!}}-
 {{!}} {{#if: {{{buying price DoF 1-7|}}}| align=center style="padding:10px; border-top:1px solid #BFDAEB; border-right:1px solid #BFDAEB;" {{!}} Seventh: {{{buying price DoF 1-7|}}} }}
 {{!}} {{#if: {{{buying price DoF 1-8|}}}| align=center style="padding:10px; border-top:1px solid #BFDAEB; border-right:1px solid #BFDAEB;" {{!}} Eighth: {{{buying price DoF 1-8|}}} }}
 {{!}} {{#if: {{{buying price DoF 1-9|}}}| align=center style="padding:10px; border-top:1px solid #BFDAEB;" {{!}} Nineth: {{{buying price DoF 1-9|}}} }}
 {{!}}} 
}}
 | selling price = {{#if: {{{slot costs DoF 1-1|}}}|
{{{!}} width=100%; background:none; text-align:center;" align="center" cellspacing=0 cellpadding=0
 {{!}}-
 {{!}} {{#if: {{{slot costs DoF 1-1|}}}| width=33% align=center style="padding:10px; border-right:1px solid #BFDAEB;" {{!}} First: {{{slot costs DoF 1-1|}}} }}
 {{!}} {{#if: {{{slot costs DoF 1-2|}}}| width=33% align=center style="padding:10px; border-right:1px solid #BFDAEB;" {{!}} Second: {{{slot costs DoF 1-2|}}} }}
 {{!}} {{#if: {{{slot costs DoF 1-3|}}}| width=33% align=center style="padding:10px;" {{!}} Third: {{{slot costs DoF 1-3|}}} }}
 {{!}}-
 {{!}} {{#if: {{{slot costs DoF 1-4|}}}| align=center style="padding:10px; border-top:1px solid #BFDAEB; border-right:1px solid #BFDAEB;" {{!}} Fourth: {{{slot costs DoF 1-4|}}} }}
 {{!}} {{#if: {{{slot costs DoF 1-5|}}}| align=center style="padding:10px; border-top:1px solid #BFDAEB; border-right:1px solid #BFDAEB;" {{!}} Fifth: {{{slot costs DoF 1-5|}}} }}
 {{!}} {{#if: {{{slot costs DoF 1-6|}}}| align=center style="padding:10px; border-top:1px solid #BFDAEB;" {{!}} Sixth: {{{slot costs DoF 1-6|}}} }}
 {{!}}-
 {{!}} {{#if: {{{slot costs DoF 1-7|}}}| align=center style="padding:10px; border-top:1px solid #BFDAEB; border-right:1px solid #BFDAEB;" {{!}} Seventh: {{{slot costs DoF 1-7|}}} }}
 {{!}} {{#if: {{{slot costs DoF 1-8|}}}| align=center style="padding:10px; border-top:1px solid #BFDAEB; border-right:1px solid #BFDAEB;" {{!}} Eighth: {{{slot costs DoF 1-8|}}} }}
 {{!}} {{#if: {{{slot costs DoF 1-9|}}}| align=center style="padding:10px; border-top:1px solid #BFDAEB;" {{!}} Nineth: {{{slot costs DoF 1-9|}}} }}
 {{!}}} 
}}
 | placement xp = {{{placement xp|}}}
 | related = {{{related|}}}
}}
3. Use infobox
{{Infobox Structure DoF 2
 |title = Random Thingy
 |subtitle = Dawn of Fire
 |image = No Image Available.png
 |type = Structure
 |available = Level 12
 |upgradable =
 |movable = Yes
 |size = 3*3
 | buying price DoF 1-1 = 10,000 {{Coin}}
 | buying price DoF 1-2 = 160 {{Diamond}}
 | buying price DoF 1-3 = 380 {{Diamond}}
 | buying price DoF 1-4 = 650 {{Diamond}}
 | buying price DoF 1-5 = 1000 {{Diamond}}
 | buying price DoF 1-6 = 1500 {{Diamond}}
 | buying price DoF 1-7 =
 | buying price DoF 1-8 =
 | buying price DoF 1-9 = 
 
 | slot costs DoF 1-1 = Free
 | slot costs DoF 1-2 = Free
 | slot costs DoF 1-3 = Free
 | slot costs DoF 1-4 = 12 {{Diamond}}
 | slot costs DoF 1-5 = 15 {{Diamond}}
 | slot costs DoF 1-6 = 23 {{Diamond}}
 | slot costs DoF 1-7 = 27 {{Diamond}}
 | slot costs DoF 1-8 = 34 {{Diamond}}
 | slot costs DoF 1-9 = 39 {{Diamond}}
 | placement xp = 40,000 XP
 | related = 
}}
Category:Templates:Mobile-friendly
Category:Mobile-friendly