Keyword

itemAuthorLatest > adding extrafields to this

  • Gerben
  • Gerben's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 4 days ago #118867 by Gerben
Hi support,

On the itempage i can show the extrafields of the item with :
<?php echo $this->item->extraFields->name->value; ?>

But in the items loaded in the itemAuthorLatest i can not show the specific values of the items.
If i use above code the values of the main item are loaded and not the values of the items in itemAuthorLatest

Is there a way to show the extrafields in the itemAuthorLatest?

Looking forward to the answer :)

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

  • Gerben
  • Gerben's Avatar Topic Author
  • Offline
  • Senior Member
More
11 years 3 days ago #118868 by Gerben
<?php
// if form is empty show default form
$k2obj = new K2ModelItem();
$fields = $k2obj->getItemExtraFields($item->extra_fields, $item);
//echo $this->item->extraFields->State->name;

?>

is doing the job

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


Powered by Kunena Forum