Keyword

Want to load a "category_item2.php" in category.php

  • Stéphane Herby
  • Stéphane Herby's Avatar Topic Author
  • Offline
  • New Member
More
13 years 9 months ago #91154 by Stéphane Herby
Hi,as i wrote in the title, I would like to load a "category_item2.php" (instead of the "category_item.php"), so I can have a layout for leadings item, and an other for Primary and secondary items (a least, hope so...)So I found this line in category.php :            <div class="itemContainer<?php echo $lastContainer; ?>"<?php echo (count($this->leading)==1) ? '' : ' style="width:'.number_format(100/$this->params->get('num_leading_columns'), 1).'%;"'; ?>>                <?php                    // Load category_item.php by default                    $this->item=$item;                    echo $this->loadTemplate('item');                ?>            </div>But I don't know how to an other file than that "category_item.php"...Could anybody give me the tip ?Thanks by advance...

Please Log in or Create an account to join the conversation.

More
13 years 9 months ago #91155 by Jiliko.net
Hi Stéphane,

if you want to load category_item2.php,

just change

echo $this->loadTemplate('item');

with

echo $this->loadTemplate('item2');

as you are in the 'category.php' file the loadTemplate() function loads the 'category_.......php' file.

Olivier

Please Log in or Create an account to join the conversation.

  • Stéphane Herby
  • Stéphane Herby's Avatar Topic Author
  • Offline
  • New Member
More
13 years 9 months ago #91156 by Stéphane Herby
Replied by Stéphane Herby on topic Want to load a "category_item2.php" in category.php
Génial :-)
I Try it right now !
Thanks Olivier ...

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum