Scotty501 Posted May 10, 2013 Share Posted May 10, 2013 Hello All, I have a custom template which calls a banner for each page in the system. I want to be able to change this banner based on the page - i.e. vpshosting.tpl should display another image, and dedicated,tpl would show another etc. etc. The problem is the header.tpl calls the image - not the individual page tpl. Any ideas or advice would be great. 0 Quote Link to comment Share on other sites More sharing options...
Guest HardSoftCode Posted May 11, 2013 Share Posted May 11, 2013 Hi You can use this in the header {if $filename == 'index'} // if the page url index.php ## add your code here {elseif $filename == 'vpshosting'} // if the page url vpshosting.php ## add your code here {/if} 0 Quote Link to comment Share on other sites More sharing options...
Scotty501 Posted May 14, 2013 Author Share Posted May 14, 2013 Thanks for the response but I am confused by this. The header already calls in a DIV called "Innerbanner" - I just want to replace this with say "Innerbanner1" for the page (lets say the page called affiliates) - so I am not sure which code goes where. Sorry for the newbie responseto you helpful post. 0 Quote Link to comment Share on other sites More sharing options...
synik4l Posted May 14, 2013 Share Posted May 14, 2013 Thanks for the response but I am confused by this. The header already calls in a DIV called "Innerbanner" - I just want to replace this with say "Innerbanner1" for the page (lets say the page called affiliates) - so I am not sure which code goes where. Sorry for the newbie responseto you helpful post. {if $filename == 'index'} // if the page url index.php <div class="innerbanner"></div> {elseif $filename == 'vpshosting'} // if the page url vpshosting.php <div class="innerbanner1"></div> {elseif $filename == 'affiliates'} // if the page url affiliates <div class="innerbanner2"></div> {/if} 0 Quote Link to comment Share on other sites More sharing options...
synik4l Posted May 15, 2013 Share Posted May 15, 2013 Correction: On the last else if that if the page is affiliates.php And your also going to have to put the different image for each, either inside the div. Or use css to make it the background-image for the div. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.