Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Routing: Standard-behavior for components #5604

wants to merge 173 commits into from


Copy link

@Hackwar Hackwar commented Jan 3, 2015

This PR implements a generic rule for standard behavior of components which routers extend from JComponentRouterAdvanced.

How to test

  • Apply this change

  • Change the router of com_content by replacing the code with the following:

    class ContentRouter extends JComponentRouterAdvanced
        public function __construct($app = null, $menu = null) {
            $this->registerView('categories', 'categories');
            $this->registerView('category', 'category', 'id', 'categories', '', true, array('default', 'blog'));
            $this->registerView('article', 'article', 'id', 'category', 'catid');
            $this->registerView('archive', 'archive');
            $this->registerView('featured', 'featured');
            $this->registerView('form', 'form');
            parent::__construct($app, $menu);
            $this->attachRule(new JComponentRouterRulesMenu($this));
            $this->attachRule(new JComponentRouterRulesNomenu($this));
            $this->attachRule(new JComponentRouterRulesStandard($this));
        public function getArticleKey($segments, $vars)
            return (int) $segments;
  • Comment line 69 and 123 from /components/com_content/helpers/route.php to disable the lookup of the Itemid there.

  • See that it creates sane URLs and that those URLs point to the right place.


This requires that #5446 and all depending requests are merged first. (You can still test this PR, since all changes from those PRs are included into this one.)

This was made possible through the generous donation of the people mentioned in the following link via an Indiegogo campaign:

Hackwar and others added 30 commits December 16, 2014 16:51
Fix CS issues that was found by Travis
…s pretty complex and throws errors in our testing environment
Nicholas K. Dionysopoulos and others added 25 commits July 10, 2015 09:04
Composer update for Joomla Framework packages and PHPUnit

Copy link
Member Author

Hackwar commented Aug 2, 2015

I've combined the changes from this and all other routing related PRs into a new PR: #7615 Please review and comment in the new PR. I'm closing this one, so that we can focuse on the new PR.

@Hackwar Hackwar closed this Aug 2, 2015
@Hackwar Hackwar deleted the componentrulesstandard branch January 6, 2016 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Language Change This is for Translators
None yet

Successfully merging this pull request may close these issues.

None yet