? ? Success

User tests: Successful: Unsuccessful:

avatar Hackwar
Hackwar
3 Jan 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:

    <?php
    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.

Issues

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: http://joomlager.de/crowdfunding/5-contributors

avatar Hackwar Hackwar - open - 3 Jan 2015
avatar jissues-bot jissues-bot - change - 3 Jan 2015
Labels Added: ?
avatar brianteeman brianteeman - change - 3 Jan 2015
Category Router / SEF
avatar JoshuaLewis
JoshuaLewis - comment - 8 Apr 2015

Any news about this?

avatar joomla-cms-bot joomla-cms-bot - change - 27 May 2015
Labels Added: ?
avatar Hackwar
Hackwar - comment - 2 Aug 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.

avatar Hackwar Hackwar - close - 2 Aug 2015
avatar Hackwar Hackwar - change - 2 Aug 2015
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2015-08-02 16:22:20
Closed_By Hackwar
avatar Hackwar Hackwar - head_ref_deleted - 6 Jan 2016

Add a Comment

Login with GitHub to post a comment