[symfony-users] Re: The template "TestTwigSuccess.php" does not exist or is unreadable in "".

2010-01-10 Thread Henrik Bjornskov
check out sfTwigPlugin http://github.com/henrikbjorn/sfTwigPlugin

On Nov 23 2009, 7:14 pm, Richtermeister  wrote:
> Hey Reynier,
>
> I'm sorry, I'm not familiar with the inner workings oftwig, I was
> just commenting on why you got the other error.
> I would take a look at the sfTwigPlugin that's in development. It
> looks like the integration would be more seamless.
>
> Daniel
>
> On Nov 22, 8:41 pm, ReynierPM  wrote:
>
> > Richtermeister wrote:
> > > You're not doing anything with the output oftwig. as far as the
> > > surrounding symfony application is concerned, you're executing the
> > > TestTwig action, and it's looking for a corresponding template. In
> > > your case you want to echo thetwigoutput and then say:
> > > return sfView::NONE, or stick thetwigoutput into the response
> > > directly..
>
> > > Hope this helps,
> > > Daniel
>
> > Hi Daniel:
> > I'm trying to get this working and I can't. As follow your suggestions
> > and wrote this piece of code at the end of the function:
>
> > $template = $twig->loadTemplate('install.index.html');
> > echo $template->render(array());
> > return sfView::NONE;
>
> > But it didn't show me the template content. Why?
> > Cheers
> > --
> > ReynierPM
-- 
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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.




[symfony-users] Re: The template "TestTwigSuccess.php" does not exist or is unreadable in "".

2009-11-23 Thread Richtermeister
Hey Reynier,

I'm sorry, I'm not familiar with the inner workings of twig, I was
just commenting on why you got the other error.
I would take a look at the sfTwigPlugin that's in development. It
looks like the integration would be more seamless.

Daniel



On Nov 22, 8:41 pm, ReynierPM  wrote:
> Richtermeister wrote:
> > You're not doing anything with the output of twig. as far as the
> > surrounding symfony application is concerned, you're executing the
> > TestTwig action, and it's looking for a corresponding template. In
> > your case you want to echo the twig output and then say:
> > return sfView::NONE, or stick the twig output into the response
> > directly..
>
> > Hope this helps,
> > Daniel
>
> Hi Daniel:
> I'm trying to get this working and I can't. As follow your suggestions
> and wrote this piece of code at the end of the function:
>
> $template = $twig->loadTemplate('install.index.html');
> echo $template->render(array());
> return sfView::NONE;
>
> But it didn't show me the template content. Why?
> Cheers
> --
> ReynierPM

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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=.




Re: [symfony-users] Re: The template "TestTwigSuccess.php" does not exist or is unreadable in "".

2009-11-22 Thread ReynierPM
Richtermeister wrote:
> You're not doing anything with the output of twig. as far as the
> surrounding symfony application is concerned, you're executing the
> TestTwig action, and it's looking for a corresponding template. In
> your case you want to echo the twig output and then say:
> return sfView::NONE, or stick the twig output into the response
> directly..
> 
> Hope this helps,
> Daniel

Hi Daniel:
I'm trying to get this working and I can't. As follow your suggestions 
and wrote this piece of code at the end of the function:

$template = $twig->loadTemplate('install.index.html');
echo $template->render(array());
return sfView::NONE;

But it didn't show me the template content. Why?
Cheers
-- 
ReynierPM

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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=.




[symfony-users] Re: The template "TestTwigSuccess.php" does not exist or is unreadable in "".

2009-11-19 Thread Richtermeister
You're not doing anything with the output of twig. as far as the
surrounding symfony application is concerned, you're executing the
TestTwig action, and it's looking for a corresponding template. In
your case you want to echo the twig output and then say:
return sfView::NONE, or stick the twig output into the response
directly..

Hope this helps,
Daniel


On Nov 19, 5:12 pm, ReynierPM  wrote:
> Hi every:
> I'm trying to use Twig on Symfony 1.4RC1. After read the docs I've wrote
> this piece of code:
>
> function preExecute() {
>      require_once sfConfig::get('sf_lib_dir').'/twig/Autoloader.php';
>      Twig_Autoloader::register();
>
> }
>
> public function executeTestTwig() {
>      $loader = new
> Twig_Loader_Filesystem(sfConfig::get('sf_web_dir').'/themes/default');
>      $twig = new Twig_Environment($loader, array(
>                      'cache' => sfConfig::get('sf_cache_dir').'/templates'
>      ));
>
>      $twig->loadTemplate('install.index.html');
>
> }
>
> But surprise when I call the method I get this error:
>
> 500 | Internal Server Error | sfRenderException
> The template "TestTwigSuccess.php" does not exist or is unreadable in "".
>
> What I'm doing wrong?
> Cheers and thanks in advance

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@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=.