0

Zend Framework 1.12 if i write $this->_forward($action, $controller, $module); in action then footer part will not execute while header code is executed successfully. What will be the solution to execute code without errors and footer part will also be display as expected.

user2243590
  • 41
  • 1
  • 2
  • can you please provide more detail – Jalpesh Patel Feb 24 '14 at 08:20
  • I had created a action and call the $this->_forward($action, $controller, $module);.When this action is called then it shows only header part not showing the footer part. I need to show on page both header and footer. – user2243590 Feb 24 '14 at 09:04
  • But what do you call 'footer' and 'header'? (its not part of standard Zend) – Volvox Feb 24 '14 at 09:05
  • Header and footer are part of layout and they are called using. Header is executed but footer part is not executed.That is my problem.I thnk its happening because of $this->_forward() is calling. – user2243590 Feb 24 '14 at 09:11
  • See also answer to this question: https://stackoverflow.com/questions/1647594/zend-framework-what-this-forward-is-doing – ChrisLo Jul 06 '17 at 06:06

1 Answers1

0

What _forward() do:

_forward($action, $controller = null, $module = null, array $params = null) 

Perform another action. If called in preDispatch(), the currently requested action will be skipped in favor of the new one. Otherwise, after the current action is processed, the action requested in _forward() will be executed. (http://framework.zend.com/manual/1.12/en/zend.controller.action.html)

Maybe this keep clear the concept and how to use it.

Usually, if you have a template system, both header and footer might be rendered.

Juan de Parras
  • 768
  • 4
  • 18