View Full Version : how to add new home page element
Dear Guys,
I can't find the instructions om how to add another section/page element after the hotpicks and before the footer on my home page, all I want to add is a row of 4 video's, you know a little horizontal youtube display type thingy, I have the code feed which works perfect on any other html/php page I have tested it on. I've added this code successfully on a few other html sites and was experimenting with calling a file in Shopwindow client V2. It doesn't work for me, but I 'd prefer if the experts explained exactly how to do it, I don't want to go messing with the homepage editing any more, just want to add a new page element. It all looks simple to do, but I want to do it correctly from the get go. How do I add another little section/page element under the hotpicks and above the footer which will contain a simple code feed for video or adsense ect?
There's a couple of ways.
The quick and dirty way would be to add the code direct into the index.tpl file in the place you want it to show, so that it shows up on the index page.
The other longer but cleaner way, would be to make a new template, say video_module.tpl and add it to your template elements folder and add the relevent contents to that template file and then add the following bit of code to the index.tpl so that it will show what is in that template on that page.
{include file="elements`$DIRECTORY_SEPARATOR`video_module.tpl"}
Hopefully you can understand the way i've put that. If not let me know and i'll try to put it in a much simpler format.
Thanks for that quick reply! but guess what? that's exactly what I thought I had to do, I tried both these methods and the homepage just became a complete blank, or the footer went missing and there was no video in it's place, so I'll try again, but I did do both these things first off, if there's any other way you can think of, please let me know, I know this is how it works, it's just that it didn't, also I was wondering if maybe the youtube feed has issues with an "index.tpl" page, does that sound silly? anyway cheers for helping, Derek
P.S The Seagulls say they miss you at the Beach!
quick update; when I created a new file to call on the homepage, firstly nothing shows on the home page, but i noticed the video code works with video_module.html and doesn't with video_module.tpl, so i'm thinking .tpl is not good for youtube video codes or am I missing something when creating a .tpl file, which I can't do in my hosting account, only html, how do you make a.tpl file compatible! Surely people are dong these element additions all the time, inserting adsense skyscraper, email forms ect, where are the instructions for this?
Can I start again? this is so frustrating, i've copied every other page element and how it is placed/called to the index page, it looks very easy to do, everytime I add my new page element it makes the footer disapear and there is just a blank bottom of page, the new page element I've created isn't even there, so
Here's what I should ask; How do you add a 468x60 google or normal banner add just above the footer? I can replace the google code with the video code feed
Does it need or have you tried the {literal}your code here{/literal} tag that is required when using smarty scripts for adding video code?
Adding a banner code should be just the same as adding any other bit of code to a page, it shouldn't mess up layout or the ability for a bit of the page to show.
Have you tried adding the new page element with just a bit of basic bog standard test text, just to see if it loads properly with that?
IntroSites
21-11-08, 04:50
As Amoochi says, plus make sure its well formatted, errors will give you a blank page as the template cant be parsed
How simple was that! using literal worked off the bat, cheers ameego's