com_content module linking to FLEXicontent

More
10 years 9 months 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:
Code:
require_once (JPATH_ADMINISTRATOR.DS.'components'.DS.'com_flexicontent'.DS.'defineconstants.php'); require_once(JPATH_SITE.DS.'components'.DS.'com_content'.DS.'helpers'.DS.'route.php'); require_once(JPATH_SITE.DS.'components'.DS.'com_flexicontent'.DS.'helpers'.DS.'route.php');

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

...so i replaced that with
Code:
$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.

More
10 years 9 months ago #43980 by ggppdk
Hello

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

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

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.283 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