0

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?

  • Just found this which would probably work devot-ee.com/add-ons/nolan , But it doesn't sound like it's supported which makes me leery to use it on a production site...Any way to do "Matrix within a Matrix"? – Mike Lohrman May 21 '13 at 16:12
2

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.

| improve this answer | |
  • 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. – Mike Lohrman May 21 '13 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?! – foamcow May 22 '13 at 9:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.