Macro with ContentSelector

Our editors want to feature products directly in the articles they are writing.

I then end up with a schema somewhat like this for my macro.

`
Inline featured product(s)

Product product `

and it works fine until i try to select two products. I then get this message:

The documentation doesn’t say anything about this, except item-sets and htmlarea support. But since it mentions that the values for the macro are stored as key-value I see where the error comes.

But would probably be easy to allow multiple items from ContentSelector as separated values in one string or with a solution like that. And then let the developer handle the support for one or multiple items…

Looks like there is a general issue with inputs having multiple occurrences in a macro form.
We are looking into this and hope to fix it for the 6.13 release.

1 Like

This issue has been fixed in 6.13, to be released soon. Inputs with multiple occurrences will work properly in macros.

The format of the macro instruction will be as before, but allowing repeating attributes with the same name:

[macroname conProducts="value1" conProducts="value2" otherField="foo"] body [/macroname]

The changes don’t affect any existing macros.

3 Likes