Reply to Cakephp & Smarty problem

Your name:

Reply:


Posted by grezlik on 08/30/07 08:11

Hi!

I have major problems with cakephp & smarty, (cake ver is 1.2 and smarty 2.6.18 [iirc])

there is a code (from cake/libs/view/view.php

class SmartyView {
..
..
..
function _render{[params]) {

[some code]

$this->Smarty->assign_by_ref('view', $this);

return $this->Smarty->fetch($__viewFn);

}

}

and problem when calling this method (_render) it always returns white chars but template file is'nt empty


if i use code like that:
1.
{
$this->Smarty->assign_by_ref('view', $this);
echo $this->Smarty->fetch($__viewFn);
return $this->Smarty->fetch($__viewFn);

} - everything is ok, echo shows that fetch() returns processed template content - return doesnt return this content (!)

2.
{
$this->Smarty->assign_by_ref('view', $this);

// return $this->Smarty->fetch($__viewFn);
return 'xyz';

} - function return string 'xyz' - everything is "ok"

3.
{
$this->Smarty->assign_by_ref('view', $this);
define('xyz', $this->Smarty->fetch($__viewFn));
return xyz;

} - everything is ok, function returns what was returned by fetch

so... why return $this->Smarty->fetch($__viewFn);
doesnt work as it should ?

do i have to set something in cakephp configuration or in php.ini ?

im using AppServ 2.5.9 with php 5.2.3

thanks in advance

sry for my english ;)

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация