One update do this - I omitted below that you also need to change the 'prefix' in the context array, which I also obtain via lookup. For development, it's: '/frontend_dev.php'.
Thanks, Steve On Jul 9, 3:15 am, Steve the Canuck <steve.san...@gmail.com> wrote: > There are some other posts on this, and a lot of people seem to set > $_SERVER['HOST'] using a value in the app.yml. I didn't find that > works for my links (which all use pattern routing). I store my host > in my app.yml, but I do this slightly differently: > > 1) Create a dummy default web context. > 2) Update the router in your default context so you replace the host > parameter > > Code is below: > > $configuration = ProjectConfiguration::getApplicationConfiguration > ($options['application'], $options['aux-env'], true); > $context = sfContext::getInstance('default'); > $routing = $context->getRouting(); > $host = sfConfig::get('app_routing_webhost'); > $options = $routing->getOptions(); > $options['context']['host'] = $host; > $routing->initialize($this->dispatcher, $routing->getCache(), > $options); > $context->set('routing', $routing); > > On Jun 5, 5:25 pm, Jack Bates <jack.ba...@gmail.com> wrote: > > > How do I generate aURLin atask? > > > I can generate URLs in templates - how do I generate aURLin lib/task/ > > MyTask.class.php? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---