I'm using a row layout SuperTable to create a recipe (ingredients are entries). Is there a way to show another field inside the related entry (not just the title) together with the entry title? I need to specify the measure (like tbsp) otherwise it's hard to know the quantity for what you're editing.
I need to show Spinach (100g) in the ingredient row. The 100g is a field called ingredientMeasure inside the ingredient entry.
I was thinking about using a hook (modifyEntryTableAttributes) - but not sure how to do it with ST. This is my hook example (from Ben's plugin tutorial):
// ADD A HOOK - modify the contents of table cell on entry index page
public function getEntryTableAttributeHtml(EntryModel $entry, $attribute) {
// check if setting is enabled and we're editing our column
if ($this->getSettings()->showCountOnEntryIndex AND $attribute == 'count')
{
return 'C<b>' . craft()->entryCount->getCount($entry->id)->count . '</b>';
}
}