Sorry for not describing it better.
I have a snippet, where i get all my data needed from my external table.
I get a product a time from my external table, i then pass those data to a chunk.
The chunk successfully shows all the information.
But since depending on the output to the chunk, i use output filters inside it.
The main chunk is the "template" and then i have a "content" part, where different kind of products show different kind of info.
Therefore, instead of organizing this main chunk with:
[[+placeholder:is=`value`:then=`
Lots of html and other placeholders
`]]
[[+placeholder:is=`value`:then=`
Lots of html and other placeholders
`]]
I would like to pass data from this chunk, to a subchunk. like this ( thought it would work ):
[[+placeholder:is=`value`:then=`
[[+subchunk? &subchunkplaceholder=`[[+placeholder that works in the main chunk]]` ]]
`]]
[[+placeholder:is=`value`:then=`
[[+subchunk? &subchunkplaceholder=`[[+placeholder that works in the main chunk]]` ]]
`]]
Ive tested alot, and it seems like it works for the first product. But not the following that use this main chunk.
Therefore i displayed the snippetcode i use to get data from my external tables, output it to the chunk, and then put that output in an $output.= variable and in the end echo that.
$myProducts=$modx->getCollection('Product');
foreach($myProducts as $product) {
$fields = $product->toArray();
$output .= $modx->getChunk('product_container', $fields);
}
echo $fields
Is this easier to understand what i mean?