I have a setup where I have to parse information from a matrix field that is nested within a playa loop.
The template code would look like this:
{exp:channel:entries}
{matrix_tag_pair}
{playa}
{matrix_field}
{/playa}
{/matrix_tag_pair}
{/exp:channel:entries}
Unfortunately the {matrix_field} would not parse. Any idea how to make the matrix field parse other than to place it outside the {playa} loop?
Cheers
Edit:
here is the longer version:
I would like to add a couple af products at the same time in a ct cart.
The products I add recide in a matrix that contains a playa field. The matrix is a recipe and the ingredients are the playa field that come from a product/ingredients channel. The quantity is defined with the matrix field {quantity}.
a basic example is this:
{exp:cartthrob:multi_add_to_cart_form return="/store/cart"}
{exp:channel:entries
channel="recipes"
disable="categories|category_fields|member_data|pagination|trackbacks"
}
<ul>
<li>{title}
<ul>You will need:
{matrix_recipes}
<li>
{products}{!-- playa field --}
{title}
<input type="hidden" name="entry_id[{entry_id}]" value="{entry_id}" />
<input type="input" name="quantity[{entry_id}]" value="{quantity}" />
(price:{product_price} each)
{/products}
</li>
{/matrix_recipes}
</ul>
</li>
</ul>
<input type="submit" value="add to cart"/>
{/exp:channel:entries}
{/exp:cartthrob:multi_add_to_cart_form}
The problem with the above setup is that the quantity is not rendering. I found a couple of ways to make this work but they were all looking clumsy. One was to wrap playa fields in the playa tag pairs leaving the quantity field outside the playa loop. That left me with a far to verbose template code.