Method: getObjects($name)

Fieldgroup type values in a file will be returned by the getValue() as an array of arrays contain the values. Using getObjects instead returns the data as an array of objects, with each object having getValue() and getHTML() methods of its own for accessing the properties of that fieldset. This is better suited to HTML output in a template.

Arguments:

$name (STRING)

Returns:

ARRAY of OBJECTs

Example:

<?php foreach($this->document->getObjects('items') as $object){ ?>
<h2><?php echo $object->getHTML('name') ?></h2>
<p><?php echo $object->getHTML('text') ?></p>
<pre><?php echo $object->getValue('raw') ?></pre>
<?php } ?>

Contact Us

Address: 22a Fishergate York, YO10 4AB · Tel: 01904 636677 · Email: info@dotadmin.com