-
- 5,888 Posts
example? Which class depending on which value in which column?
-
- 416 Posts
Let's say I have this table:
<tr>
<td>Product Name</td>
<td>Product Number</td>
<td>Product Characteristic 1</td>
<td>Product Characteristic 2</td>
<td>Product Category</td>
<td>Manufacturer</td>
</tr>
I will want to be able to sort or filter the table rows based on one or more classes in the row. I don't yet know which but it will require more than one class for a given row.
For example this row might become:
<tr class="Product-category Manufacturer">
<td>Product Name</td>
<td>Product Number</td>
<td>Product Characteristic 1</td>
<td>Product Characteristic 2</td>
<td>Product Category</td>
<td>Manufacturer</td>
</tr>
-
- 24,544 Posts
Terry,
If the field value options are a small set, you can name your classes after the values and use double placeholders in the Tpl chunk:
<td class="[[+product.characteristic.1]]">[[+product.characteristic.1]]</td>
-
- 5,888 Posts
I think the simplest solution for now, would be to create a textarea-TV where you can put the CSV-Data and a plugin, which runs at OnDocFormSave to import the CSV-Data from textarea into the MIGX-TV, if the textarea is not empty and empty the textarea-TV after import.
There is also an option in the MIGX-Configurator-CMP where you can select an action-button for import/export from/to json. Maybe this could work, if you can convert your CSV to json-data.
-
- 5,888 Posts
-
- 5,888 Posts
is it for a MIGX-TV or is it for a custom-table?