0

I am using Zend Framework. Want to make a portlet kind of view, which is like each div is generated by a different controller/view pair.

Like the layout -

<div id="news">
   <?php echo $this->layout()->news; ?> -- calls news/recent
</div>
<div id="blogs">
   <?php echo $this->layout()->blogs; ?> -- calls blogs/recent
</div>

First I thought I would get it done by Action Stack, but later I found out that was not the right way to do it.

What are the other ways to achieve the same result? Thanks in advance for any help.

Nandini Bhaduri
  • 1,835
  • 4
  • 18
  • 31

2 Answers2

2

Nandini, I think you might be better off using Action Helpers. This tutorial from Matthew Weier O'Phinney explains why, http://weierophinney.net/matthew/archives/246-Using-Action-Helpers-To-Implement-Re-Usable-Widgets.html.

DatsunBing
  • 8,684
  • 17
  • 87
  • 172
1

I suppose you could use Views Helpers : create one helper for each one of your portlets.

Pascal MARTIN
  • 395,085
  • 80
  • 655
  • 663
  • @Nandini Do yourself a favor and **[don't use the ActionView Helper](http://www.rmauger.co.uk/2009/03/why-the-zend-framework-actionstack-is-evil/)**. – Gordon Apr 14 '11 at 12:52