Post by thinkharder » Sun Aug 09, 2009 9:47 am

I am trying to add a full (jquery) banner to only the homepage but I don't know where to add it. I have it working if I add it to the layout.tpl but then it shows up on every page. Any help? Thanks!

Newbie

Posts

Joined
Sat Jul 18, 2009 10:48 am

Post by slawrence10 » Sun Aug 09, 2009 8:09 pm

in the same folder as layout.tpl is home.tpl

:)

Scott

Scott Lawrence - Creative agency - Bespoke web and graphic design


User avatar
Active Member

Posts

Joined
Sun Jul 19, 2009 8:10 pm
Location - London, UK

Post by Rich » Sun Aug 09, 2009 8:24 pm

add it to home.tpl this will be only for the front page.

Rich
Bird is the word


New member

Posts

Joined
Tue Jul 28, 2009 2:56 am
Location - Bird Cage

Post by thinkharder » Sun Aug 09, 2009 8:26 pm

Right, I got that but if you add it to the home.tpl it will only be above the middle column and not the sidebars also. I want it underneath the breadcrumbs above everything else and only on the homepage.

Newbie

Posts

Joined
Sat Jul 18, 2009 10:48 am

Post by Rich » Sun Aug 09, 2009 8:42 pm

Well I don't think you can have everything ;)

I don't think this is possible right now but I can be wrong, only think I can think of is if someone build you banner module for front page.

OR

I thing it will be possible if you can use your css file and change the style for the home.tpl and layout.tpl by adding div to home.tpl and layout.tpl and specifying in css what they need to do.

But I did not try this yet its just my theory ;)

Rich
Bird is the word


New member

Posts

Joined
Tue Jul 28, 2009 2:56 am
Location - Bird Cage

Post by thinkharder » Sun Aug 09, 2009 8:48 pm

thanks for your ideas! :)

Newbie

Posts

Joined
Sat Jul 18, 2009 10:48 am

Post by Rich » Sun Aug 09, 2009 9:30 pm

Well back to the option one, just try the css idea and it will not work. sorry :-\

Rich
Bird is the word


New member

Posts

Joined
Tue Jul 28, 2009 2:56 am
Location - Bird Cage

Post by CodeBits » Fri Aug 14, 2009 2:47 am

Using PHP you can do this.
First see my posting on embedding Flash or other multimedia here

Now for the code: Place this code where ever you want the banner to show up, change the styles and id's to your needs. This code will only show the flash or any other element you place in it on the Home Page [ index.php or index.php?route=common/home pages ] you can place anything else you want for the other pages or just leave it empty s shown.

Code: Select all

<?php
function insert_banner() {
if ($_SERVER['REQUEST_URI'] == '/index.php') {
  echo "<div align='center' style='width: 100%; height: 100px; padding: 8px 0 4px 0; border-bottom: 1px solid #DE9905; background-color: #323C45;'><div id='flash_container'></div>
	<script type='text/javascript'>
	writeFlash('flash_container');
	</script></div>";
} elseif ($_SERVER['REQUEST_URI'] == '/index.php?route=common/home') {
  echo "<div align='center' style='width: 100%; height: 100px; padding: 8px 0 4px 0; border-bottom: 1px solid #DE9905; background-color: #323C45;'><div id='flash_container'></div>
	<script type='text/javascript'>
	writeFlash('flash_container');
	</script></div>";
}else {
  echo "<div style='height: 5px;'>&nbsp;</div>";
}
}

insert_banner();
?>

User avatar
Active Member

Posts

Joined
Fri Jun 05, 2009 3:16 am
Who is online

Users browsing this forum: No registered users and 5 guests