wolfgan Reply #1, 4 months, 2 weeks ago
I'm building a snippet that returns data as a list. I want to separate a view and a business logic. How to pass output from the snippet to a chunk and display its with <li> tags?
<ul> <li>Name: [[+customer_name]]</li> <li>Phone: [[+customer_phone]]</li> </ul>
<?php
$fields = array();
$fields['customer_name'] = 'bob';
$fields['customer_phone'] = '555-1234';
return $modx->getChunk('MyChunk', $fields);