Support Forums

Adding images to template pages

This is a discussion on Adding images to template pages within the Templates, HTML, CSS, and Design Help forums, part of the General category; Can someone please give me a quick heads up on how to add/change images to template pages in particular ... ...


Go Back   68 Classifieds Forums > General > Templates, HTML, CSS, and Design Help

Reply
 
Thread Tools Display Modes
Old 04-08-2006, 06:20 PM   #1
Senior Member
 
 
Join Date: Mar 2006
Posts: 83
Rep Power: 24
sleepy will become famous soon enough
Default Adding images to template pages

Can someone please give me a quick heads up on how to add/change images to template pages in particular ...

layout.tpl
home.tpl

.... as mine appear briefly when page loads then dissapear.

Cheers,
sleepy
sleepy is offline   Reply With Quote
Old 04-08-2006, 06:53 PM   #2
Moderator
 
Chaslie's Avatar
 
Join Date: Mar 2006
Location: Great Ocean Road - Australia
Posts: 723
Rep Power: 37
Chaslie will become famous soon enough
Default

What is your URL and what is the image's file name?
__________________
Chaslie


68 Classifieds Important Links
Customer Area | Issue Tracker | User Manuals & Documentation

HTML Help
W3 Schools
Chaslie is offline   Reply With Quote
Old 04-08-2006, 07:33 PM   #3
Senior Member
 
 
Join Date: Mar 2006
Posts: 83
Rep Power: 24
sleepy will become famous soon enough
Default

Chaslie,

I dont have a site as such yet .. Im just playing around with code .. etc to see how everything fits together so that when version 3.1 is out I should have a site design Im happy with and is more or less ready to go

in layout.tpl the images default logo uses code "templates/{$smarty.const.MAIN_TEMPLATE}/images/xxx.gif"

does that mean I can just replicate this to add images to navigation framework ie layout.tpl

... and is code same when adding images to body templates ie home.tpl

sleepy
sleepy is offline   Reply With Quote
Old 04-08-2006, 07:49 PM   #4
Staff
 
Join Date: Mar 2006
Location: New Jersey
Posts: 2,162
Rep Power: 69
John Snyder is a jewel in the rough
Default

Yes, you should be able to use the same base url as the template, provided your images are located within the template directory.
__________________
John
68C Staff

68C Downloads | Report a Bug | Knowledge Base
If you have a current support subscription, you can Submit a Support Ticket
John Snyder is offline   Reply With Quote
Old 04-08-2006, 07:53 PM   #5
Moderator
 
Chaslie's Avatar
 
Join Date: Mar 2006
Location: Great Ocean Road - Australia
Posts: 723
Rep Power: 37
Chaslie will become famous soon enough
Default

This is the 'whole' code for the default logo:

HTML Code:
<img src="templates/{$smarty.const.MAIN_TEMPLATE}/images/header.gif" width="633" height="93" border="0" alt="{$title}" />
This same code could also be written as this:

HTML Code:
<img src="templates/default/images/header.gif" width="633" height="93" border="0" alt="Welcome to my site" />
The actual name of this image is: header.gif

Now if I wanted to add another image called eg 'logo.jpg', then the whole image code for that would be:

HTML Code:
<img src="templates/default/images/logo.jpg" width="633" height="93" border="0" alt="This is my logo" />
You asked, "does that mean I can just replicate this to add images to navigation framework ie layout.tpl

... and is code same when adding images to body templates ie home.tpl"

The answer is 'YES" provided you follow the examples above.

Does that make sense and does that answer the question?


You can learn more about 'image code' (image tags) here: http://www.w3schools.com/html/html_images.asp
__________________
Chaslie


68 Classifieds Important Links
Customer Area | Issue Tracker | User Manuals & Documentation

HTML Help
W3 Schools
Chaslie is offline   Reply With Quote
Old 04-08-2006, 08:40 PM   #6
Senior Member
 
 
Join Date: Mar 2006
Posts: 83
Rep Power: 24
sleepy will become famous soon enough
Default

Yep ... thanks guys

..was getting stuck on the {$smarty.const.MAIN_TEMPLATE} tag
in the file path .... and didnt realise it needed to be included in code when adding image to layout.tpl ... and also home.tpl

Cheers,
sleepy
sleepy is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Smarty Templates and You. Posted BY Lhotch Eric Barnes Templates, HTML, CSS, and Design Help 13 10-02-2007 08:06 AM


All times are GMT -4. The time now is 12:58 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2011, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0