{%- if filetype_loop == 0 %}Neighbor,Platform,Local Interface,Remote Interface,Capability,Hold Time
{%-    for neighbor in to_parse_cdp_neighbors.index %}
{{ to_parse_cdp_neighbors.index[neighbor].device_id }},{{ to_parse_cdp_neighbors.index[neighbor].platform }},{{ to_parse_cdp_neighbors.index[neighbor].local_interface }},{{ to_parse_cdp_neighbors.index[neighbor].port_id }},{{ to_parse_cdp_neighbors.index[neighbor].capability }},{{ to_parse_cdp_neighbors.index[neighbor].hold_time }}
{%-    endfor %}
{%- else %}
{%-     if filetype_loop == 1 %}
# Show CDP Neighbors
| Neighbor | Platform | Local Interface | Remote Interface | Capability | Hold Time |
| -------- | -------- | --------------- | ---------------- | ---------- | --------- |
{%-         for neighbor in to_parse_cdp_neighbors.index %}
| {{ to_parse_cdp_neighbors.index[neighbor].device_id }} | {{ to_parse_cdp_neighbors.index[neighbor].platform }} | {{ to_parse_cdp_neighbors.index[neighbor].local_interface }} | {{ to_parse_cdp_neighbors.index[neighbor].port_id }} | {{ to_parse_cdp_neighbors.index[neighbor].capability }} | {{ to_parse_cdp_neighbors.index[neighbor].hold_time }} |
{%-         endfor %}
{%-     else %}
{%-         if filetype_loop == 2 %}
<html><body>
<h1>Show CDP Neighbors</h1>
<table>
  <thead>
  <tr>
    <th>Neighbor</th>
    <th>Platform</th>
    <th>Local Interface</th>
    <th>Remote Interface</th>
    <th>Capability</th>
    <th>Hold Time</th>
  </tr>
  </thead>
  <tbody>
{%-             for neighbor in to_parse_cdp_neighbors.index %}
  <tr>
    <td>{{ to_parse_cdp_neighbors.index[neighbor].device_id }}</td>
    <td>{{ to_parse_cdp_neighbors.index[neighbor].platform }}</td>
    <td>{{ to_parse_cdp_neighbors.index[neighbor].local_interface }}</td>
    <td>{{ to_parse_cdp_neighbors.index[neighbor].port_id }}</td>
    <td>{{ to_parse_cdp_neighbors.index[neighbor].capability }}</td>
    <td>{{ to_parse_cdp_neighbors.index[neighbor].hold_time }}</td>
  </tr>
{%-             endfor %}
  </tbody>
</table>
</body></html>
{%-        else %}
# Show CDP Neighbors
{%-             for neighbor in to_parse_cdp_neighbors.index %}
## {{ to_parse_cdp_neighbors.index[neighbor].device_id }}
### Platform: {{ to_parse_cdp_neighbors.index[neighbor].platform }}
### Local Interace: {{ to_parse_cdp_neighbors.index[neighbor].local_interface }}
### Port ID: {{ to_parse_cdp_neighbors.index[neighbor].port_id }}
### Capability: {{ to_parse_cdp_neighbors.index[neighbor].capability }}
### Hold Time: {{ to_parse_cdp_neighbors.index[neighbor].hold_time }}
{%-             endfor %}
{%-        endif %}
{%-     endif %}
{%- endif %}