[Solar-talk] Solar_View simplest example
Rodrigo Moraes
rodrigo.moraes at gmail.com
Thu Jul 20 06:45:45 PDT 2006
I'm trying to make the simplest possible example for Solar_View, but
always get a 'Solar_View_Exception_TemplateNotFound' exception. After
many tries I feel I'm missing something very basic, or it can't be
used isolated like this, so please tell me and I will forget it.
<?php
error_reporting(E_ALL|E_STRICT);
// add library path
$path = dirname(__FILE__);
set_include_path(get_include_path() . PATH_SEPARATOR . $path . '/Library');
// load and start Solar
require_once 'Solar.php';
// configure
$config = array(
'Solar_View' => array(
'template_path' => $path,
),
);
// instantiate and display view
$view = Solar::factory('Solar_View', $config);
//$view->addTemplatePath($path);
$view->display('describecols.php');
?>
More information about the solar-talk
mailing list