Hey!
From what I understand, you currently set a “Format” field which is a dropdown select. From this field, you want to retrieve what is the data selected from this field and show an icon if this is the case right?
Well, follow this kind of logic and it should work ![]()
{% set table = hubdb_table_rows(module.hubdbtable_field) %}
{% for row in table %}
{% if row.format.name|lower == "download" %}
// If format = download
{% else %}
// If format != download
{% endif %}
// Other code
{% endfor %}
Example with some HTML:
{% set table = hubdb_table_rows(module.hubdbtable_field) %}
<div class='container'>
<div class='row-fluid'>
<h1>HubDB Example</h1>
</div>
</div>
<div class='container'>
<div class='row-fluid'>
{% for row in table %}
<div class='span4 columns'>
<div class='category'>
{% if row.format.name|lower == "download" %}<i class='download'>Icon</i>{% else %}{{ row.format.name }}{% endif %}
</div>
<h2>{{ row.name }}</h2>
</div>
{% endfor %}
</div>
</div>
Cheers ![]()