New answers tagged

2

I would use a macro to output the contents of a single nugget (matrix block), this way you don't have to repeat the include statement multiple times. The only thing you need to keep track of is the current index, i.e. which item is next. You can't do this inside the macro, since a macro can't have persistent state. You have two options: Set up a variable to ...


1

This is not documented because the P&T team sees this as internal functionality I guess. Looks like the control panel is going to be rebuilt in version 4 anyways probably in Vue. So you would have to rewrite your entire script too. If it‘s going to be Vue there is probably no way to use their JS API anyways. Even if it sounds funky I would suggest you to ...


2

The problem that you expect your qty variable to be an array of guests and initialize it like that, but once you set a quantity it will be an integer, so the loop won't work correctly. See this line: {% set qty = qty ?? [['']] %} This initializes qty to an array containing another array containing an empty string (by the way, why do you need the nested ...


Top 50 recent answers are included