Zend Framework PartialLoop - questions

Posted by Ian Warner on Stack Overflow See other posts from Stack Overflow or by Ian Warner
Published on 2010-03-05T03:19:12Z Indexed on 2010/05/26 5:21 UTC
Read the original article Hit count: 318

Filed under:
|

Hi

Ok dealing with Partial Loops I want to do several things

  1. Perhaps pass in extra variables - seen it done like this echo $this->partialLoop('Loop.phtml', array('data' => $data, 'var1' => foo));

But this does not seem to work - I can not extra the data using $this->var $this->data->var or $data->var not sure how to access the data in the loop

  1. Sutotals for columns - need a way of resetting variables or passing in a default value - linked to the above I suppose

ie $subtotal += rowTotal;

  1. In the view that calls the partial I would like to get access to the subtotal values generated so I can display these in another table below.

Any help appreciated the docs on partialLoop seems incomplete.

Ian

© Stack Overflow or respective owner

Related posts about php

Related posts about zend-framework