Keyword

Get the imagepath of a K2 Item from outside Joomla

  • razen
  • razen's Avatar Topic Author
  • Offline
  • Senior Member
More
5 years 5 months ago #169963 by razen
I would like to get the path to a K2 item from outside Joomla. I got the K2-ID as an input, but if I read the K2-Itemdata there's no path in there. Where is it stored? What do I need to do in ordr to get it?

Thx ^^

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

  • razen
  • razen's Avatar Topic Author
  • Offline
  • Senior Member
More
5 years 5 months ago #169965 by razen
ok i found it out myself - extremly easy if you know how, you dont need database access, just this:

$path = "../../media/k2/items/cache/".md5("Image".$id)."_XS.jpg";

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

More
5 years 5 months ago - 5 years 5 months ago #169981 by JoomlaWorks
Replied by JoomlaWorks on topic Get the imagepath of a K2 Item from outside Joomla
That was the point originally. You can also get the full item data from any K2 item as a JSON object. Simply append ?format=json to any K2 item URL, or ?format=json&callback=whatever to get JSOP.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Last edit: 5 years 5 months ago by JoomlaWorks.

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


Powered by Kunena Forum