what is the code to route the urls to flexi content items ?

3 months 1 week ago #74482 by tataye
Hello,
on a flexi site, I use accordion menu ck, wich can generate links to articles automaticaly generated.

one of them, for instance is :
  plantes-et-eaux.weblor.fr/index.php/comp...angements?Itemid=101
it goes to an error page
the right url should be : 
plantes-et-eaux.weblor.fr/index.php/docu...et-leurs-changements

same thing with items and categories

could you tell us what should be the routing code as the developper should involve his extension to propose flexicontent option ?

thanks
Serge

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

3 months 1 week ago #74484 by ggppdk
Hello

there is only 1 good way to replace URLs

these URLs that you mention are contained in the HTML of some page,
inside a component view (e.g. Joomla category view) of the page or inside a module of the page

- either create a Joomla template override of the module
- or create a Joomla template override of the view, e.g. of Joomla category view
- ... or an override of the Joomla layout file, if these are created in a layout file

and replace call to Joomla Router with calls to Flexicontent router

at the top of the override add:
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');
then for every link like:
... = JRoute::_(ContentHelperRoute::getArticleRoute($item->slug, $item->catid, $item->language));
... = JRoute::_(FlexicontentHelperRoute::getItemRoute($item->slug, (!empty($item->catslug) ? $item->catslug : $item->catid), 0, null));


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

3 months 1 week ago #74485 by ggppdk


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