I wrote

<?php echo get_class($sf_request)?>

in my template...and I got nothing printed... :(

And the method to use url_for would work for the URL's for which I
have no rules...but what about the URL's that have some rules setup
for them...

So isn't there a way to get base URL? I tried

$this->urlBase = $this->getRequest()->getUriPrefix();

in the action class...but this method does not print the port... :
(   is it some bug in getUriPrefix() method?


On May 14, 7:09 pm, "Thomas Rabaix" <[EMAIL PROTECTED]> wrote:
> use get_class($sf_request) to know the class used in the template. It
> should be sfWebRequest, unless you change the factories value for your
> env.
>
> Thomas
>
>
>
> On Wed, May 14, 2008 at 3:46 PM, Sumedh <[EMAIL PROTECTED]> wrote:
>
> >  Thanks Nicolas...
>
> >  But when I try $sf_request->getUriPrefix() in a template, I get
> >  nothing... :(
>
> >  Why would that be?
>
> >  BTW, why cant I get anything for sfConfig::get('sf_cache') in the
> >  template, whereas if I put it in the action class,  I do get a valid
> >  value...?
>
> >  On May 14, 6:33 pm, "Nicolas Perriault" <[EMAIL PROTECTED]> wrote:
>
> > > On 14 mai 2008 15:29, Sumedh <[EMAIL PROTECTED]> wrote:
>
> >  > > $sf_request is an instance of sfRequest and not sfWebRequest right?
>
> >  > In a web context, $sf_request is typed as sfWebRequest (try a
> >  > var_dump($sf_request)).
>
> >  > > I want to convert my relative "Home" link to an absolute one...for
> >  > > SEO...
>
> >  > Try <?php echo url_for('@homepage', true) ?>.
>
> >  > ++
> >  > Nicolas
>
> --
> Thomas Rabaix
>
> Internet Consultant
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to