Create Category Slider with Less/More Functionality
Add Js and CSS
<link href="<?php
echo $this->getSkinurl('css/overzichtstyle.css')?>"
rel="stylesheet" type="text/css">
<script
type="text/javascript" src="<?php echo
$this->getSkinurl('js/jquery_002.js');?>"></script>
<script
type="text/javascript" src="<?php echo
$this->getSkinurl('js/jquery_004.js')?>"></script>
<script
type="text/javascript" src="<?php echo
$this->getSkinurl('js/expander.js')?>">
</script>
<script
language="javascript" src="<?php echo
$this->getSkinurl('js/seo.js')?>"></script>
|
Change category view.phtml
<?php
$_helper = $this->helper('catalog/output');
$_category =
$this->getCurrentCategory();
$_imgHtml = '';
if ($_imgUrl
= $_category->getImageUrl()) {
$_imgHtml
= '<div class="category-image"><img
src="'.$_imgUrl.'"
alt="'.$this->htmlEscape($_category->getName()).'"
title="'.$this->htmlEscape($_category->getName()).'"
/></div>';
$_imgHtml
= $_helper->categoryAttribute($_category, $_imgHtml, 'image');
}
?>
<div id="mm_seotextholder">
<div
id="mm_seotextcontent"> <?php if($_imgUrl): ?>
<?php echo
$_imgHtml ?>
<?php endif; ?>
<h1><?php echo $_helper->categoryAttribute($_category,
$_category->getName(), 'name') ?></h1></h1>
<?php
if($_description=$this->getCurrentCategory()->getDescription()): ?>
<div
class="category-description std">
<?php
echo $_helper->categoryAttribute($_category, $_description, 'description')
?>
</div>
<?php endif;
?>
</div>
</div>
<?php
if($_imgHtml || $_helper->categoryAttribute($_category, $_description,
'description')):?>
<!--<span
id="mm_seoleesmeer">Lees meer</span>-->
<?php
endif;?>
<?php echo $this->getMessagesBlock()->getGroupedHtml()
?>
<?php if($this->isContentMode()): ?>
<?php echo
$this->getCmsBlockHtml() ?>
<?php elseif($this->isMixedMode()): ?>
<?php echo
$this->getCmsBlockHtml() ?>
<?php echo
$this->getProductListHtml() ?>
<?php else: ?>
<?php echo
$this->getProductListHtml() ?>
<?php endif; ?>
|
No comments:
Post a Comment