Keyword

can't get extra field value in content module

  • Mark Landry
  • Mark Landry's Avatar Topic Author
  • Offline
  • New Member
More
11 years 8 months ago #109818 by Mark Landry
Hi
I'm trying to customize the k2 content module template.
Having a hard time getting custom field data for the second field.

Trying this, but I don't get anything:
echo $item->extra_fields[1]->value;

if I try "print_r($item->extra_fields);" I can see all the data for the particular item, but I can't extract the value.

Thanx for your help

Mark

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

More
11 years 8 months ago #109819 by william white
Replied by william white on topic Re: can't get extra field value in content module
try adderssing the extra fields as described here if your using 2.6.2 or later

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

More
11 years 8 months ago #109820 by xaoc
you must add
Log in  or Create an account to join the conversation.

  • Mark Landry
  • Mark Landry's Avatar Topic Author
  • Offline
  • New Member
More
11 years 8 months ago #109821 by Mark Landry
Replied by Mark Landry on topic Re: can't get extra field value in content module
Thanx, I'll give that a try.

I noticed that if I set extra fields to "show" the output changes and my code works...

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