Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Dedicated server web hosting provided by Guru-host.eu.
How to combine smarty based html template files?

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


Joined: 04 Jul 2012
Posts: 8

PostPosted: Wed Jul 04, 2012 1:13 am    Post subject: How to combine smarty based html template files? Reply with quote

hello gurus,

i am new here and just learning xhmtl/css by myself.

im trying to edit a smarty based template theme and i am having difficulties editing it.

the theme files are divided by parts, like for instance, one html file for header and footer and index.

my problem with these files comes in when i try to edit the, say for instance the header.html:

in the header file, the opening div tags for a particular div block is in here, and then the closing div tags were in the footer file.

and then in the index.html file, footer and header file is included.

now, my main inquiry is, is there a way to joined these files together so i may edit it with ease? and then separate the files again later on?

or is there any way to edit these files with ease?
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7036
Location: Lincoln Nebraska, USA

PostPosted: Wed Jul 04, 2012 3:15 am    Post subject: Reply with quote

try template inheritance, its far easier to manage.
Back to top
View user's profile Send private message Visit poster's website
cosmicx
Smarty Rookie


Joined: 04 Jul 2012
Posts: 8

PostPosted: Fri Jul 06, 2012 12:45 am    Post subject: Reply with quote

thank you for the replay,

i'll read on that,

so you were referring to this one below?

http://www.smarty.net/inheritance

===

i tried to implement template inheritance but i got an error like this one below

THIS IMAGE
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7036
Location: Lincoln Nebraska, USA

PostPosted: Fri Jul 06, 2012 1:34 am    Post subject: Reply with quote

you have to use smarty 3.
Back to top
View user's profile Send private message Visit poster's website
cosmicx
Smarty Rookie


Joined: 04 Jul 2012
Posts: 8

PostPosted: Fri Jul 06, 2012 1:44 am    Post subject: Reply with quote

alright...

but i have no idea on how to update the version.

my current version is 2.6.22

how do i update it to the latest version without breaking something.
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7036
Location: Lincoln Nebraska, USA

PostPosted: Fri Jul 06, 2012 1:47 am    Post subject: Reply with quote

read the text files that ship with smarty 3 first. and don't try it on a live site obviously...
Back to top
View user's profile Send private message Visit poster's website
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