com_content module linking to FLEXicontent

5 years 6 days ago #43979 by kogos
I'm trying to modify a standard com_content module to link to flexicontent. At the top of the file i am using:
require_once (JPATH_ADMINISTRATOR.DS.'components'.DS.'com_flexicontent'.DS.'defineconstants.php');

Link is constructed with:
$link = ($news_id !== 0) ? JRoute::_(ContentHelperRoute::getArticleRoute($news_id, $news_cid)) : JRoute::_('index.php?option=com_user&view=login'); i replaced that with
$link = ($news_id !== 0) ? JRoute::_(FlexicontentHelperRoute::getItemRoute($news_id, $news_cid)) : JRoute::_('index.php?option=com_user&view=login');

However, although link is working, i am not getting a SEF link... instead, i am getting only the item ID number in the url, but i should be getting the alias as well...

Any ideas how to get the alias in the url???

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

5 years 6 days ago #43980 by ggppdk

you should pass to FlexicontentHelperRoute::getItemRoute item slug (=itemid_itemalias) and category slug (=catid_catalias)

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