Forum Discussion
Using Multiple catalogs in a single email
Is it possible to use multiple catalog selections in a single email? If so, how do you assign them different names?
1 Reply
- ArsoExpert
If you want to reference different catalog selections in different sections of the email, you can initialize the first selection, then reference the items as {{items[0].attribute}}, {{items[1].attribute}} and so on. Once that section is over, initialize a second catalog selection and use the same syntax to reference the items from that selection. So, the value of {{items[0].attribute}} would change for that section of the email.
The code gets executed sequentially, so each array item reference corresponds to the closest catalog or catalog selection that's initialized in the template, from beginning to end.
If you want to mix them up in the same section, what you can do is use a {% capture %} function at the beginning of the email to save the values of the items you want referenced. First capture the first selection items, then the second selection items, and so on. You would assign each item or item property a name in the capture statement. That way you can mix them up throughout the template.
Related Content
- 7 months ago