开发者

Displaying item only on an osCommerce home page

I have a box ad in a <div> that I have put in index.php but it's showing up in almost all the other pages.

开发者_Go百科

Which file do I need to edit or put this box ad in so that it is only visible on the home page and not on other pages?


Well i found the answer

if ( basename($PHP_SELF) == FILENAME_DEFAULT && $cPath==null) {


Give the body of your index.php an extra class. For example contentindex. Also, provide your ad-div with an extra style element:

<div class="contentindex" style="display:none;"/>

And in your css it should be something like:

.contentindex ad { 
    display: inline;
}

Work with parents and children.

But why do you want this? If it's not allowed to be visible, why is it the div there in the first place?


Even thought its not proper you can edit the language template since it allows HTML.

It's in catalog\includes\languages\english\index.php You could use:

define('TABLE_HEADING_NEW_PRODUCTS', 'Your content here.<br />New Products For %s');

Or something similar.


Add it to the bottom of the index.php file in the catalog folder. Below

<?php
  } else { // default page
?>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜