Jump to content

Smarty and Zend Partials


x1nick

Recommended Posts

I have the following, which I thought wouldnt work but gave it a go.

 

{foreach from=$this->toolbar_items key=id item=params}

{$this->partial('toolbar/item.tpl', array('id' => id, 'params' => params))}

{/foreach}

 

Essentially this would output

 

<?php foreach ($this->toolbar_items as $id => $params): ?>

    <?php echo $this->partial('toolbar/item.tpl', array('id' => $id, 'params' => $params)) ?>

<?php endforeach ?>

 

Is this even possible? I must do this a fair few times in all my projects so need to be able to do this! Cheers

Link to comment
https://forums.phpfreaks.com/topic/252624-smarty-and-zend-partials/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.