Hi Bernhard,

Check out my blog post
http://codesauce.com/2010/10/07/symfony-cron-and-html-emails-getpartial-from-cron/about
using get_partial and the likes from other places in symfony
applications.

The parts you'll want to pay particular attention to are:

// this loads in the Partial helpers
sfContext::getInstance()->getConfiguration()->loadHelpers('Partial');

and

 $emailBody = get_partial('module/notifications',array('user'=>$user));
// use get_partial as you normally would

You can do the same thing here. The first snippet makes sure that the
partials are loaded that allow you to use get_partial();

Thanks

On Tue, Nov 2, 2010 at 17:21, Bernhard Marx <bernhard.m...@gmail.com> wrote:

> Hello together,
>
> i new to symfony, but hopefully slowly I get the full knowledge ;-)
>
> I extend my Application with a Soap-Server (The Zend-Soap).
>
> I added a module an some routing which works fine....
>
> I have in "apps/frontend/lib" a class for containing the soap-
> functions...
> ##################################################################
> class Service{
> /**
> * Retrieves the Page
> *
> * @param string $token The generated token of the page
> * @return string
> */
>        public function getPage($value)
>        {
>                $this->events = Doctrine_Core::getTable('pages')
>                        ->createQuery('l')
>                        ->where('l.id = ?', 3)
>                        ->execute();
>
>                $this->page = '<html><head></head><body>This is a test:
> '.$this-
> >events->getFirst()->getTitle().'</body></html>';
>                return $this->page;
>        }
> }
> ####################################################################
>
> How can I use templates for the html-content which would have to
> loaded dynamically...
>
> Thanks in adavance
>
> Bernhard
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com<symfony-users%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>



-- 
Alex Pilon
(613) 608-1480

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to