rs324
unread,Jun 30, 2010, 9:42:25 AM6/30/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Symfony Components
i just used the sample and i cant use this
my index file :
<?php
define('ROOT',dirname(__FILE__));
require_once ROOT.'/sftpl/sfTemplateAutoloader.php';
sfTemplateAutoloader::register();
$loader = new sfTemplateLoaderFilesystem(ROOT.'/templates/%name
%.php');
$engine = new sfTemplateEngine($loader, array('php' => new
sfTemplateRendererPhp()));
echo $engine->render('index2', array('name' => 'Fabien'));
?>
and my template files :
index2.php :
======================
<?php $this->extend('layout') ?>
<?php $this->set('title', 'My Page Title') ?>
<h1>My Webpage</h1>
Hello <?php echo $name ?>
======================
layout.php :
====================
<html>
<head>
<title><?php $this->output('title') ?></title>
</head>
<body>
<?php $this->output('content') ?>
</body>
</html>
======================
now when showing index.php its dosent event know the $this var so its
mean he dont think he in class
its the core base
what is worng ?