在Joomla 3中CRoute和Jroute有什么不同?
$mainframe = JFactory::getApplication();我有$mainframe->redirect(CRoute::_('index.php?option=com_community&view=register&task=registerProfileType', false));这个重定向,它不工作,与303看到其他错误,但当我更改我的代码为$mainframe->redirect(JRoute::_('index.php?option=com_community&view=register&task=registerProfileType', false));
发布于 2015-09-28 02:55:26
来自JoomSocial维基:
通过使用我们自己的库CRoute,它是JRoute的替代品,指向JomSocial的任何部分的链接都将具有正确的Itemid,并有助于避免任何重复的链接。
你在哪里使用那个重定向链接?您确定在那里加载了JomSocial库吗?
在示例中,您应该包括库:
include_once JPATH_ROOT.'/components/com_community/libraries/core.php';然后使用对象:
// Get CUser object
$link = CRoute::_('index.php?option=com_community&view=profile&userid='.$userid);
echo '<a href="/.$link." mce_href="http://www.jomsocial.com/.$link.">View user profile</a>';https://stackoverflow.com/questions/32735144
复制相似问题