Pierre wrote:
> Hello,
>
> I'd like to know if it's possible to modify the standard file
> extension of partials recognized by the *_partial() helpers, e.g. to
> *.js instead of *.php.
>
> Cheers,
> Pierre
>
>
> >
>
>   
Pierre,

I think you can. All you have to do is make a copy symfony's 
sfPartialView.class.php somewhere in your project and have this changed 
inside:

[php]
  /**
   * Configures template for this view.
   */
  public function configure()
  {
    $this->setDecorator(false);

    $this->setTemplate($this->actionName.'.js');
    if ('global' == $this->moduleName)
    {
      $this->setDirectory(sfConfig::get('sf_app_template_dir'));
    }
    else
    {
      $this->setDirectory(sfLoader::getTemplateDir($this->moduleName, 
$this->getTemplate()));
    }
    parent::configure();
  }
[/php]

Notice the $this->setTemplate() method call.
If you find a way to specify the partial handler for different actions, 
then give me a shout, I need to know too :)

Kupo

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to