Issues

ZF-7151: Add totalCount to partialLoop view helper

Description

It would be useful to have access to the total count of the model within the partialLoop, as we do with the current position in the loop (partialCounter). This would allow you to do stuff like echo "item $this->partialCounter of $this->totalCount" as well as some HTML styling which requires a different class for the final

in an . To implement, add code like: Zend_View_Helper_Partial 74 if (isset($this->partialTotalCount)) { 75 $view->partialTotalCount= $this->partialTotalCount; 76 } Zend_View_Helper_PartiaLoop: 89 $this->partialCount = count($model);

Comments

Patched as outlined, adding partialTotalCount property. Test attached also.

Fixed on trunk (25202) and release-1.12 (25203)

Thanks to Mark!