Keyword

Accessing K2 Item from another module

  • Panagiotis Halatsakos
  • Panagiotis Halatsakos's Avatar Topic Author
  • Offline
  • New Member
More
9 years 6 months ago #141981 by Panagiotis Halatsakos
Accessing K2 Item from another module was created by Panagiotis Halatsakos
I am creating a sidebar module in a custom joomla 3.3.x theme that is using K2 as its content manager.

In the layout I am loading a k2 item that has extra fields and a selection of modules (most are generic) in the sidebar.
In the module's helper.php, I can get the K2 Item id using:

JRequest::getInt('id');

In the item there are some extra fields (price, discount) that I want to show in the sidebar as a featured location.
How can I get the item's data and the extrafields in that particular module???? Is there a detailed documentation/tutorial I can access?

I am mostly new in Joomla, but not as a php developer in general.

Kind Regards,
Panagiotis

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 6 months ago #141988 by Krikor Boghossian
Replied by Krikor Boghossian on topic Accessing K2 Item from another module
I would suggest that you use a K2 Content module so that you have all the available data.
Otherwise you would have to query the DB and based on the ID get the item's data etc, etc..

Depending on the complexity of the module I would suggest that you start working on a K2 related module.

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