{%- if filetype_loop == 0 %}Slot,Part,Description,PID,Serial Number,Virtual ID
{%-     for slot in to_parse_inventory %}
{%-         for part in to_parse_inventory[slot] %}
{%-             for part_number in to_parse_inventory[slot][part] %}
{{ slot }},{{ part_number }},{{ to_parse_inventory[slot][part][part_number].descr }},{{ to_parse_inventory[slot][part][part_number].pid }},{{ to_parse_inventory[slot][part][part_number].sn }},{{ to_parse_inventory[slot][part][part_number].vid }}
{%-             endfor %}
{%-         endfor %}
{%-     endfor %}
{%- else %}
{%-     if filetype_loop == 1 %}
# Show Inventory
| Slot | Part | Description | PID | Serial Number | Virtual ID |
| ---- | ---- | ----------- | --- | ------------- | ---------- |
{%-         for slot in to_parse_inventory %}
{%-             for part in to_parse_inventory[slot] %}
{%-                 for part_number in to_parse_inventory[slot][part] %}
| {{ slot }} | {{ part_number }} | {{ to_parse_inventory[slot][part][part_number].descr }} | {{ to_parse_inventory[slot][part][part_number].pid }} | {{ to_parse_inventory[slot][part][part_number].sn }} | {{ to_parse_inventory[slot][part][part_number].vid }} |
{%-                 endfor %}
{%-             endfor %}
{%-         endfor %}
{%-     else %}
{%-         if filetype_loop == 2 %}
<html><body>
<h1>Show Inventory</h1>
<table>
  <thead>
  <tr>
    <th>Slot</th>
    <th>Part</th>
    <th>Description</th>
    <th>PID</th>
    <th>Serial Number</th>   
    <th>Virtual ID</th>
  </tr>
  </thead>
  <tbody>
{%-             for slot in to_parse_inventory %}
{%-                 for part in to_parse_inventory[slot] %}
{%-                     for part_number in to_parse_inventory[slot][part] %}
  <tr>
    <td>{{ slot }}</td>
    <td>{{ part_number }}</td>
    <td>{{ to_parse_inventory[slot][part][part_number].descr }}</td>
    <td>{{ to_parse_inventory[slot][part][part_number].pid }}</td>
    <td>{{ to_parse_inventory[slot][part][part_number].sn }}</td>
    <td>{{ to_parse_inventory[slot][part][part_number].vid }}</td>
  </tr>
{%-                     endfor %}
{%-                 endfor %}
{%-             endfor %}
  </tbody>
</table>
</body></html>
{%-         else %}
# Show Inventory
{%-             for slot in to_parse_inventory %}
{%-                 for part in to_parse_inventory[slot] %}
{%-                     for part_number in to_parse_inventory[slot][part] %}
## {{ slot }}
### Part Number: {{ part_number }}
#### Description: {{ to_parse_inventory[slot][part][part_number].descr }}
#### Serial Number: {{ to_parse_inventory[slot][part][part_number].sn }}
#### ID
##### Part: {{ to_parse_inventory[slot][part][part_number].pid }}
##### Virual:{{ to_parse_inventory[slot][part][part_number].vid }}
{%-                     endfor %}
{%-                 endfor %}
{%-             endfor %}
{%-         endif %}
{%-     endif %}
{%- endif %}