I want to select modifiers by name because for my modifier's it's not possible to put all modifier_options in the same output, for example a <select> form. So how would I be able to select a specific modifier?

Or do I need to walk through all modifiers and doe this with something like this:

  {if "{modifier_name}" == "myMatch"}
  // Specific HTML for this match
  {if:else "{modifier_name}" == "myOtherMatch"}
  // Specific HTML for this other match

1 Answer 1


Yes. The {modifiers} tag is a loop so within that loop if you wanted to call out a particular modifier by name then you'd need to run a conditional check as you are currently showing in your example.

  • This is as I already wrote. The problem is that I'm also using translations so the {modifier_name} is not in my control.. BTW: I need the quotation marks around {modifier_name}.
    – Timo002
    Feb 25, 2014 at 13:16
  • What kind of translations? You make no mention of this in your question. Stepping back a little however what exactly are you trying to achieve? If you want more fined-grained control over your modifiers you do have the option of text input modifiers. If you also view the source of your template with the modifiers loop applied you'll see the output and can hard code the same name attributes and values if required. All depends on what you're trying to do.
    – Ian Young
    Feb 25, 2014 at 18:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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