Hello. Help solve the problem. There is a code that displays a description of the category.

<div class="category_description"> <?php echo $this->category->category_description ; ?> </div> 

Categories have pagination type:

  • mysite.com/category
  • mysite.com/category?start9
  • mysite.com/category?start18
  • etc.

Please tell me how to set a condition so that this div appears only on the first pages of the categories: mysite.com/category , mysite.com/category2 , mysite.com/tag4 , etc. Thank you very much!

    1 answer 1

     if($_GET['foo'] == 'category' || $_GET['foo'] == 'category2' || $_GET['foo'] == 'tag2'){ print '<div class="category_description">'. $this->category->category_description .'</div>'; } 

    try this

    * instead of foo, insert the array index used in your code

    • Thank. But you misunderstood me a little! You need to create a condition that will display the block only on the first page of pagination. Categories may be N-th number and they may have a different URL. It is necessary to create a condition that will not output a block if there is a? Start. probably so - Anna