Created
January 30, 2017 17:30
-
-
Save strsar/30cf625f82990b37fd86683b8f0ebab9 to your computer and use it in GitHub Desktop.
[Joomla!] - Remove article ID from SEF URL's via System Plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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