Click to See Complete Forum and Search --> : how can i go about achieving this


oo7ml
08-29-2008, 04:35 AM
Hi, my site uses smarty templates and the header.tpl file is obviously used throughout every single page on the site.

The header.tpl file displays an image banner at the top of my site

<div id="banner">

{html_image file="/img/banner.gif" alt="Banner"}

</div>


I want to change this banner image to a flash banner. I have replaced the above code with the following:

<div id="banner">

<!--[if !IE]> -->
<object type="application/x-shockwave-flash"
data="img/banner.swf" width="407" height="92">
<!-- <![endif]-->
<!--[if IE]>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
width="407" height="92">
<param name="movie" value="img/banner.swf" />
<!--><!--dgx-->
<param name="loop" value="true" />
<param name="menu" value="false" />
</object>
<!-- <![endif]-->

</div>

The flash banner displays perfectly on the homepage, but as soon as i click to a page that is in another directory the flash banner is NOT displayed. This is obviously because the above code points directly to the file from the top level (home page directory) value="img/banner.swf"

How can i solve this so that all pages in any directory will display the flash banner. I am not sure of the coding format used in the *.tpl files so any help is greatly appreciated.

thanks in advance

ratcateme
08-29-2008, 05:19 AM
you could make it a full path like /img/banner.swf

Scott.

oo7ml
08-29-2008, 05:35 AM
you could make it a full path like /img/banner.swf

Scott.

No way, that worked!!! But i don't understand how, what if an index.php file is located in /news/stories/today - would that not look for the banner in /news/stories/today/img/banner.swf

ratcateme
08-29-2008, 05:46 AM
i dont know if you know much about linux but if you went
cd /test/
it would go to the root dir / then to test
if you went
cd test/
it would go to
/where/you/are/now/test/
the same for
cd ./test/
it would also go to
/where/you/are/now/test/

i hope that helps

Scott.

oo7ml
08-29-2008, 09:33 AM
Ok cool, thank you