Advertisement
oscarholmedo

How to get rid of article ID on Joomla URL

Aug 26th, 2015
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.75 KB | None | 0 0
  1. //Open components\com_content\router.php in an editor and make a small changes:
  2. //in function ContentBuildRoute(&$query) replace line 27
  3.  
  4. $advanced    = $params->get('sef_advanced_link', 0);
  5. //with
  6. $advanced    = $params->get('sef_advanced_link', 1);
  7.  
  8. //in function ContentParseRoute($segments) replace line 208
  9. $advanced    = $params->get('sef_advanced_link', 0);
  10. //with
  11. $advanced    = $params->get('sef_advanced_link', 1);
  12.  
  13. //Comment out this lines
  14.  
  15. if (strpos($segments[0], ':') === false) {
  16.     $vars['view'] = 'article';
  17.     $vars['id'] = (int)$segments[0];
  18.     return $vars;
  19. }
  20. //so it would be
  21.  
  22. /*
  23. if (strpos($segments[0], ':') === false) {
  24.     $vars['view'] = 'article';
  25.     $vars['id'] = (int)$segments[0];
  26.     return $vars;
  27. }
  28. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement