I keep trying this all different ways and cannot get it to work
Here is the error code that you asked for,
Fatal error: Uncaught exception 'Rain\RainTpl_NotFoundException' with
message 'Template product1 not found!' in /home/developm/public_html/
code/vendors/Rain/Tpl.php:190 Stack trace: #0 /home/developm/
public_html/code/vendors/Rain/Tpl.php(78): Rain\Tpl-
>_check_template('studies/product...') #1 /home/developm/public_html/
studies/product_study/index.php(37): Rain\Tpl->draw('studies/
product...', true) #2 {main} thrown in /home/developm/public_html/code/
vendors/Rain/Tpl.php on line 190
===============
my page is loaded with the following. (Note that. my page template
has quite a few {include="pages"} for files that are in my template
directory for the header, footer, and javascript files that are used
side wide)
This php file exists here:
webroot
| ---> [] studies
| ---> [] product1
| ---> index.php
<?php
// namespace
use Rain\Tpl;
// include
include "../../code/vendors/Rain/Tpl.php";
// Temporary during development
$base_url = "http://".$_SERVER['SERVER_NAME'] . "/";
// config
$config = array(
"base_url" => $base_url,
"tpl_dir" => "templates/ax/",
"cache_dir" => "cache/",
"debug" => true,
"auto_escape" => false,
);
Tpl::configure( $config );
// Add PathReplace plugin
require_once('../../code/vendors/Rain/Tpl/Plugin/PathReplace.php');
Rain\Tpl::register_plugin( new Rain\Tpl\Plugin\PathReplace());
//initialize a Rain TPL object
$t = new Tpl;
$t->draw( "studies/product1" ); //
=========================================
Then in the template directory (templates/ax), I have the following
(where the html file is a plain HTML file with a few includes to other
templates that contain the header and footer., such as
{include="static-content/stylesheets"} )
webroot
| ---> [] templates
| ---> [] studies
| ---> product1.html
=======
I get the above error when loading. I have tried it also with sending
the output to a string and then loading a different template, but
RainTpl just cannot find the template.