Keyword

Using K2 Tools Module (custom PHP code) to display item para

  • PixelBaer
  • PixelBaer's Avatar Topic Author
  • Offline
  • New Member
More
8 years 3 months ago #155493 by PixelBaer
Hi there,

I hope maybe someone in this forums could help me:

I want to display some params of the currently viewed K2-Article in a module. For example the Tags, or the Authors Name, or some Extra Fields.
I thought it could be possible with the K2 Tools custom code module?

with something like
<?php echo $this->item->author->avatar; ?>

I guess my problem is I don't know how to obtain the object $this->item inside the module.
All help really appreciated.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 3 months ago #155512 by Krikor Boghossian
Replied by Krikor Boghossian on topic Using K2 Tools Module (custom PHP code) to display item para
Hello,

You will have to directly query the database and select the item based on the id in order to access $this->item or $item and the object's properties.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum