Best Approach for Rendering Site Elements Based on Zend Framework

I am using the front controller resource 'modules' to configure the project. What is the best approach for rendering site elements like navigation?

  • Add an action that passes an element to the end of the action stack for each request?
    • OK to visualize these elements through controller actions?
  • Create a plugin that displays an element?
    • Can I use modular modules?
  • Are there other possible ways to do this?
+2
source share
1 answer

I think a stack of actions should be avoided. Check out this article why .

You can use the plugin method, or you can create a ViewHelpers that you call from the layout script. I like the ViewHelpers method because it keeps everything very clear. You know that when you echo from $ this-> mainNaviation (), there is a ViewHelper called MainNavigation.

+3
source

All Articles