Forums / Setting Up Categories, Products, Attributes / How to only show category description on first resutlts page?

How to only show category description on first resutlts page?

Locked

Views: 1,542

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
22 Oct 2008, 10:40 AM
#1
ricardovangwan avatar

ricardovangwan

New Zenner

Join Date:
Oct 2008
Posts:
2
Plugin Contributions:
0

How to only show category description on first resutlts page?

Hi,

In categories that run to a number of pages of products, I would like to only show the category description on the first page. I have found the code I need to adpat but I have no idea what variables I am to use to only show the description on the first page of the category.

<?php // categories_description if ($current_categories_description != '') { ?> <div id="indexProductListCatDescription" class="content"><?php echo $current_categories_description; ?></div> <?php } // categories_description ?>

Can any body offer any suggestions?

23 Oct 2008, 9:26 AM
#2
ricardovangwan avatar

ricardovangwan

New Zenner

Join Date:
Oct 2008
Posts:
2
Plugin Contributions:
0

Re: How to only show category description on first resutlts page?

I worked it out but I'll leave the answer here for others. Changes are made to tpl_index_product_list.php

If anybody wants to do this to avoid duplicate content (for SEO purposes) then this is the code I worked out you need:

<?php // categories_description if ($current_categories_description != '' && $_GET['page'] =='') { ?> <div id="indexProductListCatDescription" class="content"><?php echo $current_categories_description; ?></div> <?php } // categories_description ?>

If you made changes to the database you could also set different descriptions for every category page this way.

&& $_GET['page'] ==''

means the first page ONLY will show the description