Hi I have an EZ Page sidebox which is a news feed fed through feedburner. I want the sidebox to be displayed on the homepage of my website and not on any other pages. Does someone have the code to do this?
Hi I have an EZ Page sidebox which is a news feed fed through feedburner. I want the sidebox to be displayed on the homepage of my website and not on any other pages. Does someone have the code to do this?
Look at and make a copy for your template of tpl_main_page.php
There are many commented if's and cases that you can tailor to your needs
Zen-Venom Get Bitten
Get Your Business Found
So would I do something like this?
example to not display right column on main page when Always Show Categories is ON and set to categories_id 3<br />
<br />
if ($current_page_base == '1,2,3,4,5,shopping_cart,login,checkout_shipping,checkout_payment,checkout_confi rmation,checkout_success,logoff' and $cPath == '' or $cPath == '3') {<br />
$flag_disable_left = true;<br />
}<br />
And would this disable all sideboxes apart from the categories links?
Can't tell from the snipprt
But using the override system just place/load a copy of the edited file in your_template/common folder and refresh the page
If you get what you want great
If it breaks the page, delete the file you just uploaded
Zen-Venom Get Bitten
Get Your Business Found
ok, I thought thats what you'd say.
Just thought I'd share an easy peasy way of doing this for anyone wanting to know. Really easy with a stylesheet.
If you want to burn a feed though feedburner and display it as a sidebox. Burn your feed, then copy and paste the code into the tpl_ezpages.php sidebox template so you end up with something like this:
<?php
/**
* Side Box Template
*
* @package templateSystem
* @copyright Copyright 2003-2005 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: tpl_ezpages.php 2982 2006-02-07 07:56:41Z birdbrain $
*/
$content = "";
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">';
$content .= "\n" . '<ul style="margin: 0; padding: 0; list-style-type: none; display:none;">' . "\n";
for ($i=1, $n=sizeof($var_linksList); $i<=$n; $i++) {
$content .= '<li><a href="' . $var_linksList[$i]['link'] . '">' . $var_linksList[$i]['name'] . '</a></li>' . "\n" ;
} // end FOR loop
$content .= '</ul>' . "\n";
$content .= '<div id="feedburner"><script src="http://feeds.feedburner.com/YOURFEED?format=sigpro" type="text/javascript" ></script><noscript><p>Subscribe to RSS headline updates from: <a href="http://feeds.feedburner.com/YOURFEED"></a><br/>Powered by FeedBurner</p> </noscript></div></div>';
?>
Switch on the side box and at this stage the feed will appear on every page which for some sites might be ok. However I only wanted the feed displayed on the homepage which poses a small problem in getting the ezpages sidebox to switch off on other pages.
Solution:
I've wrapped the feedburner feed with <div id="feedburner">
The zen cart homepage and zen cart pages beneath have different body ID's so this means I'm able to use my stylesheet to turn the ezpages sidebox off on all pages beneath the homepage.
Very easy to do, this all you would need to add to your stylesheet
#indexBody #feedburner {
display:none;
}
#productinfoBody #feedburner {
display:none;
}
#shoppingcartBody #feedburner {
display:none;
}
#loginBody #feedburner {
display:none;
}
#checkoutshippingBody #feedburner {
display:none;
}
#checkoutpaymentBody #feedburner {
display:none;
}
#checkoutconfirmationBody #feedburner {
display:none;
}
Hope someone finds this useful.
Bookmarks