Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
skrypty php w templatce

 
Post new topic   Reply to topic    Smarty Forum Index -> Language: Polish
View previous topic :: View next topic  
Author Message
elmozaur
Smarty Rookie


Joined: 19 Jun 2011
Posts: 6

PostPosted: Sun Jun 19, 2011 3:35 pm    Post subject: skrypty php w templatce Reply with quote

moj drugi post chcialbym poswiecic mozliwosci uzywania php w templatkach Smarty3.
w konfigu dopisalem linijke:
$this->_smarty->php_handling = 'SMARTY_PHP_ALLOW';
a w templatce pisze np
{php}
echo 'to test';
{/php}
niestety zamiast napisu dostaje error.

czy jeszcze cos trzeba dopisac aby zwykly php dzialal w templatkach ?
Back to top
View user's profile Send private message Send e-mail
elmozaur
Smarty Rookie


Joined: 19 Jun 2011
Posts: 6

PostPosted: Sun Jun 19, 2011 5:16 pm    Post subject: Reply with quote

znalazlem. Gdyby ktos mial jeszcze z tym problem to podaje rozwiazanie:
$this->_smarty->allow_php_tag = true;

i wszystko dziala
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Language: Polish All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP