View Single Post
  #2  
Old 01-12-2016, 04:46 AM
  seyfin's Avatar 
seyfin seyfin is offline
 

X-Cart team
  
Join Date: May 2004
Posts: 1,223
 

Default Re: default/en/category_description.tpl

If you look at the code of default/en/category_description.tpl template file, you will see the following code there:

Code:
<div class="category-description">{getDescription():h}</div>

To implement the feature in question, first you need to customize the template code as follows:

Code:
<div IF="isVisible()" class="category-description">{getDescription():h}</div>

Additionally, you will need to customize the following class/method:

classes/XLite/View/Category.php

Code:
/** * Return description with postprocessing WEB LC root constant * * @return string */ protected function getDescription() { return $this->getCategory()->getViewDescription(); }

So that if category description is equal to category title, then return an empty string ''.

See also:
* Developer docs
__________________
Sincerely yours,
Sergey Fomin
X-Cart team
Chief support group engineer

===

Check this out. Totally revamped X-Cart hosting
http://www.x-cart.com/hosting.html

Follow us:
https://twitter.com/x_cart / https://www.facebook.com/xcart / https://www.instagram.com/xcart
Reply With Quote