Skip to content

Instantly share code, notes, and snippets.

@strsar
Created January 30, 2017 17:30
Show Gist options
  • Save strsar/30cf625f82990b37fd86683b8f0ebab9 to your computer and use it in GitHub Desktop.
Save strsar/30cf625f82990b37fd86683b8f0ebab9 to your computer and use it in GitHub Desktop.
[Joomla!] - Remove article ID from SEF URL's via System Plugin
<?php defined('_JEXEC') or die;
class plgSystemPlugin extends JPlugin {
public function __construct(&$subject, $config = array()) {
parent::__construct($subject, $config);
}
/**
* @event onAfterInitialise
*/
function onAfterInitialise(){
$app = JFactory::getApplication();
/**
* Advanced link
*
* Removes item id's from auto generated urls
* May cause issues if items have the same alias
*/
JComponentHelper::getParams('com_content')->set('sef_advanced_link', 1);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment