Hi again, It's not unusual to keep your own little library of portable classes. If you're writing such "helper classes" specifically for your application, you could put them in /application/library/App, then prefix the class with App. If you're certain they will be used in other applications as well, you might find yourself a unique prefix and just add classes to it whenever needed.
Note that could just as well put this "own" library in /library, if that's were you keep your other libraries. It's all a matter of preference, but generally they should be in a library folder, which makes it easier for set_include_path() (or put it elsewhere in your include_path). Lots of choices :) Robin On Wed, Apr 23, 2008 at 9:06 PM, Gina-Marie Rollock < [EMAIL PROTECTED]> wrote: > Thanks so much for your prompt response! I'll try what you've said, but > I'm not familiar with writing plugins, (haven't gotten to that point yet!), > and so I don't know exactly where in the directory structure to put the > class script (does it go inside of another script?). I'm very new to > Framework and am fighting my way through it. I really appreciate the input. > > > > Gina-Marie > > > > *From:* Robin Skoglund [mailto:[EMAIL PROTECTED] > *Sent:* Wednesday, April 23, 2008 2:42 PM > *To:* Gina-Marie Rollock > *Cc:* [email protected] > *Subject:* Re: [fw-general] Alternate layouts by module > > > > I'd consider writing a postDispatch plugin, so you know what module you're > actually dispatching. Something like: > > class My_Controller_Plugin_ModuleLayout extends > Zend_Controller_Plugin_Abstract > { > public function postDispatch(Zend_Controller_Request_Abstract > $request) > { > $layout = Zend_Layout::getMvcInstance(); > $module = $request->getModuleName(); > $layout->setLayout($module); > } > } > > Then in your bootstrap you do $front->registerPlugin(new > My_Controller_Plugin_ModuleLayout()). > > Of course, you could also do something more specific, e.g. limiting to > only a few layouts and use a switch-case. Endless possibilites. This should > also be a quite portable way of doing things. > > Robin > > On Wed, Apr 23, 2008 at 8:09 PM, rollockg < > [EMAIL PROTECTED]> wrote: > > > Is there a way to define in my bootstrap a separate layout path for each > module? > -- > View this message in context: > http://www.nabble.com/Alternate-layouts-by-module-tp16834740p16834740.html > Sent from the Zend Framework mailing list archive at Nabble.com. > > >
