I i was wondering if there is a way to remove the article ID from the URL produced by the in built SEF of joomla or at least tag it to the end.
I find it being at the beginning just does not work to well from me

Is this possible
Thanks
Moderator: General Support Moderators
Code: Select all
$advanced = $params->get('sef_advanced_link', 0);
Code: Select all
$advanced = $params->get('sef_advanced_link', 1);
Code: Select all
$advanced = $params->get('sef_advanced_link', 0);
Code: Select all
$advanced = $params->get('sef_advanced_link', 1);
Code: Select all
if (strpos($segments[0], ':') === false) {
$vars['view'] = 'article';
$vars['id'] = (int)$segments[0];
return $vars;
}
Code: Select all
/*
if (strpos($segments[0], ':') === false) {
$vars['view'] = 'article';
$vars['id'] = (int)$segments[0];
return $vars;
}*/
Thanks a lot, that's exactly what i needGWealth wrote:I had exactly the same problem. Did all I could to remove the ID from my website's url's. I tried downloading plugins, but only that most of them didn't work and were to complicated. Besides, you don't want to slow your website down with unnecessary plugins if you don't really need to.
So many other I noticed liked to recommend "just point a menu to the article, and that will remove the ID Number." But this is really unpractical. I don't want to clutter my website with "Menu Items."
So this is how I fixed mine:
The solution is that you will need to open components\com_content\router.php in an editor and make a few small changes (be sure to backup router.php):
in function ContentBuildRoute(&$query) go to line 27 and change "0" to "1"
27:withCode: Select all
$advanced = $params->get('sef_advanced_link', 0);
27:in function ContentParseRoute($segments) go to line 208 and change "0" to "1"Code: Select all
$advanced = $params->get('sef_advanced_link', 1);
208:withCode: Select all
$advanced = $params->get('sef_advanced_link', 0);
208:Then you will need to comment out lines 228-232Code: Select all
$advanced = $params->get('sef_advanced_link', 1);
228
229
230
231
232
so it would be changed toCode: Select all
if (strpos($segments[0], ':') === false) { $vars['view'] = 'article'; $vars['id'] = (int)$segments[0]; return $vars; }
That's it! I tested this on my Joomla 2.5 test site and finally got rid of those annoying IDs that kept showing in my site's url locations.Code: Select all
/* if (strpos($segments[0], ':') === false) { $vars['view'] = 'article'; $vars['id'] = (int)$segments[0]; return $vars; }*/
The old urls with the IDs still work if you link to them (which is good to avoid dead links, but you still want to have everything point to non-ID'd urls), so any manually linked pages that you've typed out in your website, you will need to edit and remove those ID's in those links you put in. For example:
You would change any links like this
http://www.example.com/tools/28-article-page
to
http://www.example.com/tools/article-page
The later link would work and replace the first link.
If you're not sure and can't decide whether you want to make any changes, you can have a look at the url's on my website http://www.graspthewealth.com and see for yourself as to if there are article IDs showing in the urls. Most Articles showed an ID, especially the calculators. Finally this solution is what worked for me.
This information I found from:
http://developernote.com/2012/05/how-to ... oomla-2-5/
You're welcome, preynt!preynt wrote:Thanks a lot, that's exactly what i need
Does anyone know if this will work for joomla 1.5.26??GWealth wrote:I had exactly the same problem. Did all I could to remove the ID from my website's url's. I tried downloading plugins, but only that most of them didn't work and were to complicated. Besides, you don't want to slow your website down with unnecessary plugins if you don't really need to.
So many other I noticed liked to recommend "just point a menu to the article, and that will remove the ID Number." But this is really unpractical. I don't want to clutter my website with "Menu Items."
So this is how I fixed mine:
The solution is that you will need to open components\com_content\router.php in an editor and make a few small changes (be sure to backup router.php):
in function ContentBuildRoute(&$query) go to line 27 and change "0" to "1"
27:withCode: Select all
$advanced = $params->get('sef_advanced_link', 0);
27:in function ContentParseRoute($segments) go to line 208 and change "0" to "1"Code: Select all
$advanced = $params->get('sef_advanced_link', 1);
208:withCode: Select all
$advanced = $params->get('sef_advanced_link', 0);
208:Then you will need to comment out lines 228-232Code: Select all
$advanced = $params->get('sef_advanced_link', 1);
228
229
230
231
232
so it would be changed toCode: Select all
if (strpos($segments[0], ':') === false) { $vars['view'] = 'article'; $vars['id'] = (int)$segments[0]; return $vars; }
That's it! I tested this on my Joomla 2.5 test site and finally got rid of those annoying IDs that kept showing in my site's url locations.Code: Select all
/* if (strpos($segments[0], ':') === false) { $vars['view'] = 'article'; $vars['id'] = (int)$segments[0]; return $vars; }*/
The old urls with the IDs still work if you link to them (which is good to avoid dead links, but you still want to have everything point to non-ID'd urls), so any manually linked pages that you've typed out in your website, you will need to edit and remove those ID's in those links you put in. For example:
You would change any links like this
http://www.example.com/tools/28-article-page
to
http://www.example.com/tools/article-page
The later link would work and replace the first link.
If you're not sure and can't decide whether you want to make any changes, you can have a look at the url's on my website http://www.graspthewealth.com and see for yourself as to if there are article IDs showing in the urls. Most Articles showed an ID, especially the calculators. Finally this solution is what worked for me.
This information I found from:
http://developernote.com/2012/05/how-to ... oomla-2-5/