Please refer to the table at http://www.tomsofmaine.com/research/ingredients for reference. I currently have a Matrix field setup to add new ingredients and generate a table and it works beautifully. Now the client wants a letter label separating each alphabetical section. I can't think of an easy way to do this so it's easy to update for the client. I don't think I can use Matrix anymore, and the only other option I can think of is to build the entire form in Wygwam, but that would make it very tough for the client to update. Any ideas?
1 Answer
You could do this by creating each ingredient as an entry then building the table using an exp:entries tag pair.
You can then use Low Alphabet (http://gotolow.com/addons/low-alphabet) add on to create the alphabetic sorting links required.
If you didn't wish to pay for the add on then you could get the data out using a custom database query or number of queries to get the ingredients into groups.
Creating the ingredients as entries rather than rows of a matrix will also mean that you can make the whole thing more easily searchable should you wish to.
-
I actually need more than one table of ingredients on a page so I don't know if making each ingredient an entry will work unless Low Alphabet works with Playa and I can relate ingredient entries to a different channel entry. May 21, 2013 at 17:42
-
I'd still set up a separate ingredients channel and then use Playa as you mention. Off the top of my head I'm not sure if Low Alphabet will work with Playa but there could be a (slightly clumsy) workaround involving passing entry IDs of ingredients to an embed which outputs the sortable list. But, how many ingredients are in each recipe that they need alphabetising/sorting?!– foamcowMay 22, 2013 at 9:58