On Thu, Aug 12, 2010 at 9:42 AM, Ryan Lange <cl1mh422...@gmail.com> wrote:
> On Wed, Aug 11, 2010 at 12:22 PM, Hector Virgen <djvir...@gmail.com>wrote: > >> You could also use a partial. Partials handle the cloning/var-clearing for >> you. >> >> Also, be careful with getViewScript(), because it adds a suffix based on >> the context. It's .phtml by default, but it could be .ajax.phtml if you're >> using the AjaxContext action helper. >> >> -- >> Hector Virgen >> Sent on my Droid X >> > > Regarding using a partial, do you mean something like this? > > <?php > > $mail->setBodyHtml( $this->view->partial( 'emails/client.phtml' ) ); > > ?> > It turns out that this does not work for my purposes. The initial problem that I encountered exists with this method, too; the module, controller, and action parts aren't present in the view script path. It appears that I must make use of the ViewRenderer helper if I want to prevent potential refactoring errors down the road. I'll just have to work around the possible context switching issue if I ever encounter it. Thanks, Ryan