Yes, this works perfectly, but its not the problem: I wonder only if
its a symfony bug, if I do this configuration on all environment:
all:
routing:
class: sfPatternRouting
param:
context:
host: mydomain.org
and all urls are generated without frontend_dev.php ...
On Oct 7, 3:00 pm, Danny <[email protected]> wrote:
> There is no way to know the real URL from the CLI (from a Task)
>
> I think you're doing fine using this:
>
> cli: # <--- only on cli environment
> routing:
> class: sfPatternRouting
> param:
> context:
> host: mydomain.org
>
> On Oct 7, 3:57 am, Fabian Spillner <[email protected]> wrote:
>
>
>
> > Yes, I know how to create absolute urls - but this doesn't help:
>
> > <?php echo link_to("Link", '@blah?bloh=bleh', 'absolute=true') ?>
>
> > This function generates without this host configuration in the
> > factories.yml strange url:
>
> > >http://./symfony/blah/bloh/bleh
>
> > and if I set this host configuration for every environment, the url is
> > generated on dev environment:
>
> > >http://my-domain/blah/bloh/bleh
>
> > instead of
>
> > >http://my-domain/frontend_dev.php/blah/bloh/bleh
>
> > On Oct 6, 4:25 pm, Jonathan Wage <[email protected]> wrote:
>
> > > If you pass absoloute => true option to link_to() 3rd argument it will
> > > output the full absolute url.
>
> > > - Jon
>
> > > On Tue, Oct 6, 2009 at 8:38 AM, Fabian Spillner
> > > <[email protected]>wrote:
>
> > > > If you create links on mail templates with link_to and the mails are
> > > > sent by task.
>
> > > > The absolute url is created correctly if you set the factories:
>
> > > > all:
> > > > routing:
> > > > class: sfPatternRouting
> > > > param:
> > > > context:
> > > > host: mydomain.org
>
> > > > But now all urls are generated without like frontend_dev.php if you
> > > > are on dev environment:
>
> > > >http://mydomain.org/xxx/xxxxinsteadof
> > > >http://mydomain.org/frontend_dev.php/xxx/xxxx
>
> > > > The workaround is:
>
> > > > cli: # <--- only on cli environment
> > > > routing:
> > > > class: sfPatternRouting
> > > > param:
> > > > context:
> > > > host: mydomain.org
>
> > > > I think, its a bug!
>
> > > > Or is there another way to create links on email templates (I read the
> > > > partial with get_partial and pack the content into swift mailer).
>
> > > > Thank you!
>
> > > --
> > > Jonathan H. Wage (+1 415 992 5468)
> > > Open Source Software Developer & Evangelist
> > > sensiolabs.com | jwage.com | doctrine-project.org | symfony-project.org
>
> > > You can contact Jonathan about Doctrine, Symfony and Open-Source or for
> > > training, consulting, application development, or business related
> > > questions
> > > at [email protected]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---