|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
mwb01 Smarty n00b
Joined: 07 Sep 2013 Posts: 1
|
Posted: Sat Sep 07, 2013 5:21 am Post subject: Links Invalid |
|
|
Hello
I have small issue.
I have created my template lay out.
but not working properly only picking up header.tpl
link to contact page will not connect.
Here is way I have set it up
Code: |
<?php
require_once('system/libs/Smarty.class.php');
$smarty = new Smarty();
$smarty->template_dir = 'catalog/view/theme/website/template/common';
$smarty->compile_dir = "system/cache";
$smarty->display('header.tpl');
?>
index.php
system > libs
catalog > view > theme > website > template > common > header.tpl
catalog > view > theme > website > template > information > contact.tpl
catalog > view > theme > website > template > data > more files.
|
|
|
Back to top |
|
IT_Services Smarty Rookie
Joined: 30 Sep 2013 Posts: 9
|
Posted: Mon Sep 30, 2013 9:44 am Post subject: |
|
|
You need to provide the correct folder names:
Code: | $smarty->template_dir = 'catalog/view/theme/website/template/';
$smarty->display('common/header.tpl');
$smarty->display('information/contact.tpl'); |
Maybe this works too (not tested):
Code: | $smarty->template_dir = 'catalog/view/theme/website/template/common/';
$smarty->display('header.tpl');
$smarty->display('../information/contact.tpl'); |
|
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|