the fields values list

1 week 18 hours ago #77200 by alog
the fields values list was created by alog
Hello,

I can not find and retrieve the fields values (and custom fields) created by Flexicontent

How to access the list of values in the Joomla / Flexicontent interface?

thank you.

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

1 week 15 hours ago #77204 by ggppdk
Replied by ggppdk on topic the fields values list
Hello

to get Item in custom code
$item_id = 457;
 
JTable::addIncludePath(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_flexicontent'.DS.'tables');
require_once (JPATH_SITE.DS.'components'.DS.'com_flexicontent'.DS.'classes'.DS.'flexicontent.fields.php');
//require_once (JPATH_SITE.DS.'components'.DS.'com_flexicontent'.DS.'classes'.DS.'flexicontent.helper.php');
require_once (JPATH_SITE.DS.'components'.DS.'com_flexicontent'.DS.'helpers'.DS.'permission.php');
require_once (JPATH_SITE.DS.'components'.DS.'com_flexicontent'.DS.'models'.DS.FLEXI_ITEMVIEW.'.php');
 
$app  = JFactory::getApplication();
$user = JFactory::getUser();
 
$itemmodel = new FlexicontentModelItem();
$item = $itemmodel->getItem($item_id, $check_view_access=false);
 
// Get Fields
list($item) = FlexicontentFields::getFields($item, $view, $item->parameters, $aid);

Now you have value of a field via
$item->fieldvalues[SOMEFIELDID]

If you want to create the display of the field
// item view or category view
$myfield_html = FlexicontentFields::getFieldDisplay($item, 'fieldname');
 
// use either:
echo $myfield_html;
echo $item->fields['fieldname']->display;


-- 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 review. Thanks!

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

Moderators: vistamediajoomlacornerggppdk
© 2018 Flexicontent. All Rights Reserved.