>> 2009/6/25 iceangel89 <[email protected]>: >> > >> > anyone? >> >
>> Martin Martinov [mailto:[email protected]]: >> Apparently no, nobody. It could be that some of us are too busy to reply to every message that comes in to the list. >>I think I've already wrote you a private mail kindly asking >> you to stop filling my and thousands of others inboxes with those "anyone" messages. Please stop. I don't see more than one for a few topics, that's not a excessive amount of "anyone" messages. If there were several repeated for one topic then yes that would be going overboard a bit. Maybe if someone replied and gave iceangel89 a direction he/she would not have to ask over and over. I get so many messages from various lists, on about 25 different accounts, that iceangel89's "anyone" messages are at the bottom of my list of annoying mail. Actually, your "stop sending anyone" message is more annoying to me personally. :p >> > >> > iceangel89 wrote: >> >> >> >> how will u implement modules? i am refering to modules as in, in a >> >> page, usually there will be >> >> >> >> - a section for main content >> >> - other "modules" eg. login, member area, latest news etc. <- these >> >> will appear depending of which part (module, controller, action) of >> >> the site eg. i want to display all "modules" in the main page, say >> >> some modules in the admin module etc? iceangel89, it could be that no one really understands what your asking. At first I thought you were asking about creating a modular controller directory structure. But after reading it a few more times I think your asking how to create a layout with "widgets" on it or views from other controllers. >> >> >> >> how will u implement these? i am thinking having different >> >> Zend_Layout then in each have sections for the "modules". i am >> >> wondering if this a good way? is there a better way? maybe Zend_View_Helpers or something? >> >> >> > You could either use a Zend_View_Helper inside the layout template to render another controller or call the helper direct in the controller then assign the output to a variable in the layout. Either way would work. As for a best way, I don't know. Each has advantages and disadvantages. The action view helper is a good example of using a controller in another template. See http://framework.zend.com/manual/en/zend.view.helpers.html#zend.view.helpers .initial.action for more information. I didn't use that in my setup. I have a global library directory for shared Zend_View_Helpers. As an example, I have a login form that is created using a Zend_View_Helper. I can from anywhere in any controller "fetch" the login form and assign it to a view or layout in order to be displayed to a user. This allows me to create a /login controller which uses the form and then reuse that same form as a widget on the default front page of the site. You could create a news helper that generates a list of headlines, for example. That helper could be used in the /news path and then again as a widget on another page. Or if you used the action helper instead of a view helper you could just render the /news in the default layout. You would likely not want the /news to have it's own base layout though. You can disable the layout in your /news controller if needed. The modular directory structure in my project allows for a lot of independent or shared files. Some information on modular directory structure can be found in the links below, if interested in that. http://www.atirjavid.com/Zend-Framework-Tutorials/Zend_Application/A-Modular -Directory-Structure-Quickstart-Module-Switcher-Front-Controller-Plugin.html http://www.zfforums.com/zend-framework-general-discussions-1/general-q-zend- framework-2/1-8-0-bootstrapping-modules-autoloaders-2783.html Hope that helps some. Terre
