[fw-general] Zend Layout and _forward

2008-08-27 Thread pvechi
Hi there again, I am creating the HTML in my application using Zend Layout using a similar method shown in the Zend documentation. Here is an extract from the documentation: "As an example, let's say your code first hits FooController::indexAction(), which renders some content to the default re

Re: [fw-general] Zend Layout and _forward

2008-08-27 Thread Tobias Schifftner
Normally you should not always forward to an other action. Only if you really need to do so. Not all the time... Well, as I can see you use already layout()->content; ?>, so all other $this->view variables will be within that. In your view script view/scripts/action.phtml you can just use title

Re: [fw-general] Zend Layout and _forward

2008-08-28 Thread pvechi
Thanks for your reply Tobias. In my example where I send only the title to the nav variable, i do so for illustrative purposes. Eventually i want to send a complete navigation menu. However, I am looking for direction with the code based on the example in the ZF documentation. I am unsure how t

Re: [fw-general] Zend Layout and _forward

2008-08-28 Thread vladimirn
Not so hard i think. If i understud well, you should use $this->_forward at the end of you action. So lets say you have IndexController.php and in this controller you want to use forward _forward('menu','nav'); // where 'menu' stand for menuAction in NavController and 'nav' is a NavController.php

Re: [fw-general] Zend Layout and _forward

2008-08-28 Thread Tobias Schifftner
Hi Pete, I actually did a start for a dynamic navigation. I never really finished (and believe me, it's been a while) because I didn't really need it anymore . But may be it gives you a hint. Well, the navigation has to be on every page, why not use a plugin for handeling?!? class Navigation ex

Re: [fw-general] Zend Layout and _forward

2008-08-29 Thread pvechi
Tobias, Thank you again. I tried the _forward but I only get the 'nav' on the view and not the 'content'. Same problem as before. :( My index controller has this: class Customers_IndexController extends Zend_Controller_Action { function init() { $this->initVie

Re: [fw-general] Zend Layout and _forward

2008-08-29 Thread pvechi
I actually tried actionstack. initView(); Zend_Loader::loadClass('Customers'); $this->view->baseUrl = $this->_request->getBaseUrl(); $this->view->user = Zend_Auth::getInstance()->getIdentity(); } function preDispatch() {