How to retrieve items via AJAX

More
10 years 3 months ago - 10 years 3 months ago #43942 by hede
How can I retrieve the item object with all its properties of a given item id via an AJAX call in my custom module?

cheers

FF on Win10, FLEXIcontent version 3.0.10 on Joomla 3.4
Last edit: 10 years 3 months ago by hede.

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

More
10 years 3 months ago #43981 by ggppdk
Hello

use this code :
Retrieving the HTML DISPLAY of FC fields inside 3rd-party code

Just after calling:
Code:
FlexicontentFields::getFields($items);

delete code:
Code:
FlexicontentFields::getFieldDisplay($item, 'field_name'); ...



And use this to output the field values
$item->fieldvalues[field_id];
e.g. with
Code:
echo json_encode($item->fieldvalues); exit;
or the full item with:
Code:
echo json_encode($item); exit;


Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

More
10 years 3 months ago #44002 by hede
Replied by hede on topic How to retrieve items via AJAX
Thanks! But I face this problem:

Fatal error: Class 'FlexicontentHelperPerm' not found in <b>C:\Users\...\administrator\components\com_flexicontent\models\parentclassitem.php</b> on line <b>977</b>


FF on Win10, FLEXIcontent version 3.0.10 on Joomla 3.4

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

More
10 years 3 months ago #44053 by hede
Replied by hede on topic How to retrieve items via AJAX

FF on Win10, FLEXIcontent version 3.0.10 on Joomla 3.4

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

More
10 years 3 months ago #44106 by hede
Replied by hede on topic How to retrieve items via AJAX
What is this snippet for in www.flexicontent.org/site-content/70-dev...-3rd-party-code.html ?
Code:
$field_names_arr = ...

It does not appear anywere in the code again. So it is not used at all I'd say.

FF on Win10, FLEXIcontent version 3.0.10 on Joomla 3.4

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

More
10 years 3 months ago #44109 by ggppdk
Hello

it can be used in a field display loop, in your case just ignore it


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.297 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline