There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Tag Cloud
acer asus batch bios blue screen boot bsod computer connection crash desktop dns driver drivers error excel freeze gaming hard drive hardware hdmi internet laptop memory modem motherboard mouse network networking outlook printer problem router security slow software sound toshiba trojan usb video video card virus vista wifi windows windows 7 windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
question about smarty

Reply  
Thread Tools
sudhakararaog's Avatar
Computer Specs
Senior Member with 117 posts.
 
Join Date: Sep 2007
Experience: Intermediate
05-Nov-2009, 07:25 PM #1
question about smarty
i am using smarty template engine at work place, following is the situation


i already have 1 template that has already been created example = http://localhost/sites/template1.com this works fine

following is the folder structure i have for smarty on xampp

1. C:\xampp\htdocs\sites\template1.com where i have .htaccess index.php and siteconf.php

2. C:\xampp\htdocs\sites\_templates\templates\template1


in the siteconf.php file there are all the major variables defined which are accessed in other tpl file of the templates example in aboutus page, contactus page etc of this template1

now i have created another template called template2 and this also has the same structure

1. C:\xampp\htdocs\sites\template2.com where i have .htaccess index.php and siteconf.php

2. C:\xampp\htdocs\sites\_templates\templates\template2


my question is the look and feel when i access
http://localhost/sites/template1.com and
http://localhost/sites/template2.com

is the same the only thing that needs to be done is for template2 when i access http://localhost/sites/template2.com ONLY the header image should be different compared to the header i have for http://localhost/sites/template1.com this is the only change i need

i am not aware as to the php code i need to write so that when i access http://localhost/sites/template2.com the header image changes and this new header image remains for the entire pages of http://localhost/sites/template2.com

presently in header.tpl of template1 is written as follows

{if strpos($Data.KEYWORD,"rv rental") === false}
<div class="header" style="background:url(images/header_{$siteData.COUNTRY3}.gif) no-repeat top left;">
{else}
<div class="header" style="background:url(images/header_{$siteData.COUNTRY3}_rv.gif) no-repeat top left;">
{/if}
</div>

so i need to change the {if} {else} where i need to mention that if i am accessing http://localhost/sites/template2.com then the header image should be different.

any help will be greatly appreciated.

please advice.

thanks.
Reply

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 01:37 AM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.