Remove Article ID from Joomla 3 url

不想你离开。 提交于 2019-12-14 03:44:37

问题


I am trying to remove article id from Joomla 3 URL. I searched around and the response is in

components\com_content\router.php

change 0 to 1 in $advanced = $params->get('sef_advanced_link', 1);

on lines 38 and 290

and also comment out

if (strpos($segments[0], ':') === false) { $vars['view'] = 'article'; $vars['id'] = (int)$segments[0]; return $vars; }

I consider it works fine in Joomla 2.5 as all comments mention this.

But it does not do the job for me on my Joomla 3.3 website.

How can I achieve this without creating menu items for each article?


回答1:


Instead of doing it in the filesystem and modify the Joomla core, you can do this by modifying the com_content row in the extensions table as described here: http://www.itoctopus.com/how-to-remove-the-article-id-from-joomlas-sef-urls (the 2 methods are described in that URL, the filesystem method and the database method)

Note that this is tested on Joomla 3.x and it should work. If it doesn't work for you then most likely you will need to clear your Joomla cache.



来源:https://stackoverflow.com/questions/23809575/remove-article-id-from-joomla-3-url

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!