Code: Select all
$data = array(
array('item1' => 'bar', 'item2' => 'foo'),
array('item1' => 'something else', 'item2' => 'neato'),
array('item1' => 'bees', 'item2' => 'frogs'),
);Code: Select all
echo $this->partialLoop('items.phtml', $data);Code: Select all
<h1><?php echo $this->escape($this->item1); ?></h1>
<p><?php echo $this->escape($this->item2) ?></p>Code: Select all
$data = array('boo','bar','baz','bog','big','ball');Code: Select all
echo $this->partialElementLoop('items.phtml', $data);Code: Select all
<h1><?php echo $this->escape($this->element); ?></h1>Code: Select all
echo $this->partialElementLoop('items.phtml', $data, 'item')OK, so yeah, that was quite a lot of explanation and code samples for this simple question. What should I call this view helper? I just can't stand the name "PartialElementLoop". Can you guys think of anything better?