2

My blog item link looks like this

http://localhost/joomla/blog/5-our-principle

5 is the id showing. how can i remove the id?

1

Joomla does not provide any configuration to change this.

But you can use additional extensions which can remove id from the url.

Below are some of the extension, you can further check it on JED for more extensions. http://extensions.joomla.org/extensions/extension/site-management/sef/simple-custom-router

http://extensions.joomla.org/extensions/extension/extension-specific/seblod-extensions/canonical-field-for-seblod

1

If you have only few articles and you are not planning to add more, then create "Articles - Single Article" menu item for each of your article. Painful but works.

1

There is one hack that can remove ID from the url but it demands touching the core files of Joomla. So note if you'll update the version of the CMS in the future, you'll lose this solution.

Open the file components/com_content/router.php, find the row:

$advanced = $params->get('sef_advanced_link', 0);

and repalce 0 with 1

Also comment the condition:

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

    return $vars;
}*/

It works for Joomla 3.x (for 2.5 I didn't test)

  • i tried what you have said, but i got this error "404 - Category not found" – aish May 22 '15 at 4:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.