JM Slideshow – how to only use on the homepage

Hi

I only want to use the JM slideshow on my homepage, how can I do this? Currently it shows on all pages.

Thanks

2 answers

Profile photo of Saguaros 0.00 $tone October 29, 2012
Public

Hi johnnieg,

Please open .phtml files in app\design\frontend\your_store\your_templatetempl ate\page. For example, as per demo site, we use 2columns with right bar as default layout so I open file: 2columns-right.phtml

Replace this code:

PHP Code:

<?php if ($this->getChildHtml('slideshow')) : ?>
<!-- JM SlideShow -->
<div id="ja-slideshow" class="wrap">
<div class="main">
<div class="main-inner1 clearfix">
<?php echo $this->getChildHtml('slideshow'?>
</div>
</div>
</div>
<!--[if IE 7]>
<br class="clear" />
<![endif]-->
<!-- //JM SlideShow -->
<?php endif; ?>


With:

PHP Code:

<?php
if($this->getUrl('') == $this->getUrl('*/*/*', array('_current'=>true'_use_rewrite'=>true))):
?>
<?php 
if ($this->getChildHtml('slideshow')) : ?>
<!-- JM SlideShow -->
<div id="ja-slideshow" class="wrap">
<div class="main">
<div class="main-inner1 clearfix">
<?php echo $this->getChildHtml('slideshow'?>
</div>
</div>
</div>
<!--[if IE 7]>
<br class="clear" />
<![endif]-->
<!-- //JM SlideShow -->
<?php endif; ?>
<?php 
endif; ?>


Once done, flush all magento cache.

#1

This question is now closed

Written By

Comments