0

我想为 joomla 3+ 开发一个组件。我正在使用数据库来获取菜单中的类别并手动创建链接,如下所述。

// Creating the manual link
$linkThingsToDo = JRoute::_('index.php?option=com_mycom&view=city&layout=thingstodo&cid[]='.$cityID.'&cat_id[]='.$value->catid);

在这里,我使用“cid []”作为城市 ID,使用 cat_id [] 作为类别 ID,并且我在地址栏中获得了这样的链接:

joomla/index.php/city-guide-3/city/thingstodo?cid[0]=2&cat_id[0]=4

虽然我想要“joomla/index.php/city-guide-3/city_name_here/category_name_here”

“joomla/index.php/city-guide-3/Dubai/Chocolate”

使用 localhost 进行测试。我应该怎么做才能实现上述 SEF URL

4

0 回答 0