Keyword

extraFields call doesn't work in category_item.php

More
11 years 9 months ago - 11 years 9 months ago #107965 by Olgri
Hello

I'm trying to display some extra fields on item view (item.php) and category item view (category_item.php) pages.
The following code works in item.php but not category_item.php :
<?php echo $this->item->extraFields->EXTRAFIELDALIASHERE->value; ?>

I have also tried code suggested by Jurawa -> getk2.org/documentation/tips-a-tricks/item/221-custom-admin-templates-and-calling-specific-extra-field-data
...but again it worked in item.php but not category_item.php

Is there a way to output an extra field on category item view page?

Joomla! 2.5.8
K2 v2.6.2

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

More
11 years 9 months ago #107966 by Olgri
Solved!

Apparently there is a setting in the backend that controls whether to show Extra Fields in category item view or not....

Big thanks to Gerardis Giannis for pointing this out :cheer:

Edit the K2 category and set "show" to the "Extra Fields" in "Item view options in category listings".
Finally, be sure that you have the right K2 template in the category you make the changes.

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


Powered by Kunena Forum