473,395 Members | 1,742 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Cakephp & Smarty problem

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 ;)
Aug 30 '07 #1
0 2131

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Daan | last post by:
Hello all, I'm having a little problem with Smarty. Getting it to work in a simple case went fine, but now I have the following situation: / /smarty /templates template.tpl /templates_c
1
by: Richard | last post by:
I need help. I have a smarty based program that I am modifying. I have a smarty template file that consists of smarty and HTML. I need to integrate some PHP database calls into it. My problem...
2
by: M | last post by:
Hi Folks, I am trying to install Smarty using PHP 5 on a Windows XP PC using IIS v6 The following PHP File: <!doctype html public "-//W3C//DTD HTML 4.0 //EN"> <html> <head>
0
by: Matt | last post by:
geez, i've done this a million times, you'd think i could get it right. uploading to production server for a new site, and part of the head.inc that starts everything up looks like this: echo...
4
by: Mickey | last post by:
Hi, I am currently undertaking a project in php. I'm updating a current website, which is just a standard blog, but my plan is to implement it as a similar site to myspace, i am just having...
2
by: Gene | last post by:
i'm newcomer in using smarty and i have problem like this: i want to have one template file (e.g. index.tpl) in this file section which use variable {$content}. and two files *.php which are using...
7
by: diane100 | last post by:
Hi I am new to PHP and Smarty (I know only very basic things) and I need help with a warning message I get when I call a page in a browser. I purchased some software from a company who are no...
6
by: K. | last post by:
Hello! I have a problem with using php on smarty web page I would like to use a php code from this web page: http://www.money.pl/webmaster/# i.e.. <?php readfile...
0
by: arunj82 | last post by:
Hi All, I am doing a project in cakephp. What my problem is when ever i close my browser and when i reopen it, session id(i.e userAgent) in cakephp is not changing. I want to use this session id...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.