Newbie Planning Help - Plugin or Helper?
Hi All,
I've scoured the forums for this question and am fairly new to the Zend Framework so please be patient with me. I'm looking for the best way to integrate a simple menu into my application. Since this menu will be available to all of my views and my main layouts, I do not want to write redundant code in the Action Controllers. I tried using the ActionStack but was unsuccessful and somehow ended up in an infinite loop. So I decided to write a custom plugin to query my Menu model instead. Writting the plugin was easy but within the plugin I realized I only have access to the request or response object. So, my question is, how can I pass the data that I create in the plugin so that my views/layouts can access the content easily without having to write redundant code in the controllers? I can't really think of a good way and don't want to store the info in a global or registry variable. If there's a better way to do this than using a plugin, please let me know. Thanks for taking the time to read this and looking forward to any responses.
Bst Rgds,
Andreas Sandberg
|