Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Links Invalid

 
Post new topic   Reply to topic    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
mwb01
Smarty n00b


Joined: 07 Sep 2013
Posts: 1

PostPosted: Sat Sep 07, 2013 5:21 am    Post subject: Links Invalid Reply with quote

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
View user's profile Send private message
IT_Services
Smarty Rookie


Joined: 30 Sep 2013
Posts: 9

PostPosted: Mon Sep 30, 2013 9:44 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP