how can i go about achieving this

Discussion in 'Programming' started by oo7ml, Aug 29, 2008.

  1. #1
    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>
    Code (markup):

    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>
    Code (markup):
    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
     
    oo7ml, Aug 29, 2008 IP
  2. saurabhj

    saurabhj Banned

    Messages:
    3,459
    Likes Received:
    61
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try Following:
     
    saurabhj, Aug 29, 2008 IP