Get fields from choosen item ID

5 years 7 months ago #37617 by Natwork
Hi everyone !
First I would like to thanks Flexicontent team for their great work !

I have a list of items that i want to display. I know their ids, but i can't display fields from this items.

I'm not sure if i speak correctly, so here is an exemple :

I have this :

And i wonder to know if there is something like this :

In facts, i'm using a SQL request that gives me item ids that i want to display in an Array.
So i made this :
<?php foreach ($results as $itemid) :
echo JRoute::_(FlexicontentHelperRoute::getItemRoute($items[$i]->slug));
endforeach; ?>

Anyone can help me to replace this "$items[$i]" with the good code?

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

5 years 7 months ago #37623 by ggppdk
your question is more like a general Joomla question:
How to get a variable out of a menu item

outside loop:
$menus = JFactory::getApplication()->getMenu('site', array());

inside loop:
$menu = $menus->getItem($_component_default_menuitem_id);
$fc_item_id = @$menu->query['id'];


-- 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.