Keyword

Show specific extra field on category view

  • Francisco Caivano Zori
  • Francisco Caivano Zori's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 3 months ago #97870 by Francisco Caivano Zori
Show specific extra field on category view was created by Francisco Caivano Zori
Im tryng to get the values from specific extra field on the category_item.php.

 

As i do in item.php

 

for example using:<?php $custom = $this->item->extra_fields; ?><?php if(!empty($custom[1]->value)):?> <?php echo $custom[1]->value;?><?php endif;?> 

 

 

But i cant get theme on 
category_item.php. the same way i do on item.php

 

 

any help? :D

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

  • Francisco Caivano Zori
  • Francisco Caivano Zori's Avatar Topic Author
  • Offline
  • Junior Member
More
13 years 3 months ago #97871 by Francisco Caivano Zori
Replied by Francisco Caivano Zori on topic Show specific extra field on category view
It was just something simple.

 

Put this code:

 

<?php $custom = $this->item->extra_fields; ?>

<?php echo $custom[0]->name; ?>

<?php echo $custom[0]->value; ?>

<?php echo $custom[1]->name; ?>

<?php echo $custom[1]->value; ?>

 

and of course:

 - Enable extrafields (that was the stupid thing i was forgetting to do!)

 - And remove the original extrafields code from the category_item.php

 

thats all .. hope it helps somebody

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

More
13 years 2 months ago #97872 by Victor Dermendjiev
Replied by Victor Dermendjiev on topic Show specific extra field on category view
Is there a way to use that code outside item.php and category_item.php? I wish I could use it in a module position, but can't make it work :(

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


Powered by Kunena Forum