- Posts: 4
COMMUNITY FORUM
Displaying certain Extra Fields on Category Item
- Gorka Molero
- Topic Author
- Offline
- New Member
Less
More
12 years 1 month ago #102316
by Gorka Molero
Displaying certain Extra Fields on Category Item was created by Gorka Molero
Hello Everyone!
I'm trying to display certain specific k2 extra fields on my category_item.php.
I've managed to do it on item.php, following this article , with the following code added to the template override:
I'm trying to display certain specific k2 extra fields on my category_item.php.
I've managed to do it on item.php, following this article , with the following code added to the template override:
Log in or Create an account to join the conversation.
- william white
- Offline
- Platinum Member
Less
More
- Posts: 3722
12 years 1 month ago #102317
by william white
Replied by william white on topic Re: Displaying certain Extra Fields on Category Item
try.
$custom = $this->item->extra_fields; and then
echo $custom[1]->value;
in the category_item.php and see if there is a variable confilct of some sort
$custom = $this->item->extra_fields; and then
echo $custom[1]->value;
in the category_item.php and see if there is a variable confilct of some sort
Please Log in or Create an account to join the conversation.
- Gorka Molero
- Topic Author
- Offline
- New Member
Less
More
- Posts: 4
12 years 1 month ago #102318
by Gorka Molero
Replied by Gorka Molero on topic Re: Displaying certain Extra Fields on Category Item
Hello William,
Still no luck. The code doesn't work on item.php etither. How can I check if there's a variable conflict going on?
Thanks,
Gorka
Still no luck. The code doesn't work on item.php etither. How can I check if there's a variable conflict going on?
Thanks,
Gorka
Please Log in or Create an account to join the conversation.
- Olgri
- Offline
- New Member
Less
More
- Posts: 10
11 years 9 months ago #102319
by Olgri
Replied by Olgri on topic Re: Displaying certain Extra Fields on Category Item
Hi Gorka
Have you found a solution? I've got exact same problem here :(
Please let me know if you've solved it and how :)
Have you found a solution? I've got exact same problem here :(
Please let me know if you've solved it and how :)
Please Log in or Create an account to join the conversation.
- Peter Grube
- Offline
- Elite Member
Less
More
- Posts: 241
11 years 9 months ago - 11 years 9 months ago #102320
by Peter Grube
Replied by Peter Grube on topic Re: Displaying certain Extra Fields on Category Item
HI
If your using the latest K2 you can use the Extra field alias metthod in both Item & Cat View
If your using the latest K2 you can use the Extra field alias metthod in both Item & Cat View
Log in or Create an account to join the conversation.
- Olgri
- Offline
- New Member
Less
More
- Posts: 10
11 years 9 months ago #102321
by Olgri
Replied by Olgri on topic Re: Displaying certain Extra Fields on Category Item
Hi Peter
unfortunately this works in item.php but not in category_item.php :(
unfortunately this works in item.php but not in category_item.php :(
Please Log in or Create an account to join the conversation.
- Peter Grube
- Offline
- Elite Member
Less
More
- Posts: 241
11 years 9 months ago #102322
by Peter Grube
Replied by Peter Grube on topic Re: Displaying certain Extra Fields on Category Item
Hi Olgri,
Strange it's not working for you, it works on both my localhost / wamp server & on my Live site. Here's my cat_item.php overide code the Extra Field Alias is Price.
Strange it's not working for you, it works on both my localhost / wamp server & on my Live site. Here's my cat_item.php overide code the Extra Field Alias is Price.
Log in or Create an account to join the conversation.
- Olgri
- Offline
- New Member
Less
More
- Posts: 10
11 years 9 months ago #102323
by Olgri
Replied by Olgri on topic Re: Displaying certain Extra Fields on Category Item
I have just tested it on localhost as well and it's the same as on live site - works in item.php and doesn't work in category_item.php :(
My Joomla! is 2.5.8 and K2 is v2.6.2 . What about you?
My Joomla! is 2.5.8 and K2 is v2.6.2 . What about you?
Please Log in or Create an account to join the conversation.
- Ioannis Gerardis
- Offline
- New Member
Less
More
- Posts: 1
11 years 9 months ago #102324
by Ioannis Gerardis
Replied by Ioannis Gerardis on topic Re: Displaying certain Extra Fields on Category Item
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.
Hope I help you.
Finally, be sure that you have the right K2 template in the category you make the changes.
Hope I help you.
Please Log in or Create an account to join the conversation.
- Olgri
- Offline
- New Member
Less
More
- Posts: 10
11 years 9 months ago - 11 years 9 months ago #102325
by Olgri
Replied by Olgri on topic Re: Displaying certain Extra Fields on Category Item
OMG Gerardis Giannis you are a life saver!!! :cheer: THANK YOU!!!!!!
How stupid of me to miss this and search for the solution for hours! :oops:
How stupid of me to miss this and search for the solution for hours! :oops:
Please Log in or Create an account to join the conversation.