jxns Posted April 1, 2010 Share Posted April 1, 2010 I want a flash animation to appear as the header for the home page, but the rest of the versions to show a static version.I thought I could use a PHP include but realised I cant as they are TPL files, has anyone got any ideas?Thanks Link to comment Share on other sites More sharing options...
jxns Posted April 1, 2010 Author Share Posted April 1, 2010 OK see below how I solved for those who want to know how to do thisInserting PHP into a tpl file: {php} include('header_flash.php'); {/php} The code to display a different flash header on index.php (this is the file header_flash.php): <?php if(basename($_SERVER['PHP_SELF'])=='index.php') { include 'flash_anim.php'; } else { include 'flash_static.php'; } ?> Link to comment Share on other sites More sharing options...
Star Posted April 4, 2010 Share Posted April 4, 2010 This is another way of doing it.Go to header.php in the root. Look for the last two lines: $smarty->display(_PS_THEME_DIR_.'header.tpl'); ?> Change it to if ($page_name == 'index') $smarty->display(_PS_THEME_DIR_.'header-something.tpl'); else $smarty->display(_PS_THEME_DIR_.'header.tpl'); ?> Then just prepare a header-something.tpl and upload it to the themes folder. That is it. Link to comment Share on other sites More sharing options...
google-friend Posted April 5, 2010 Share Posted April 5, 2010 This is another way of doing it.Go to header.php in the root. Look for the last two lines: $smarty->display(_PS_THEME_DIR_.'header.tpl'); ?> Change it to if ($page_name == 'index') $smarty->display(_PS_THEME_DIR_.'header-something.tpl'); else $smarty->display(_PS_THEME_DIR_.'header.tpl'); ?> Then just prepare a header-something.tpl and upload it to the themes folder. That is it. Thank you Star. I did what you said and it works. Link to comment Share on other sites More sharing options...
Star Posted April 5, 2010 Share Posted April 5, 2010 This is the best way here.http://www.prestashop.com/forums/viewthread/46529/P135/#221505 %-P Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now