? Success

User tests: Successful: Unsuccessful:

avatar phproberto phproberto - open - 18 Nov 2013
avatar wilsonge
wilsonge - comment - 18 Nov 2013

Whilst we're at it - in my opinion we may as well move all the other functions using the pagination.php template override into a JLayout and then deprecate the method of using a chromePath.

Also the method you've changed is the only one I didn't get around to unit testing :P So this is actually going to need a reasonable amount of testing in Joomla and 3rd party templates

But overall massive :+1:

avatar phproberto
phproberto - comment - 18 Nov 2013

Thanks I fixed the B/C chromes support.

The idea is to direclty stop using other methods that could be overridable. I already did it that way and this is a step further.

Overriding all means to have something like:

    /**
     * Create the html for a list footer
     *
     * @param   array  $list  Pagination list data structure.
     *
     * @return  string  HTML for a list start, previous, next,end
     *
     * @since   1.0
     */
    protected function _list_render($list)
    {
        return JLayoutHelper::render('pagination.list.render', $list);
    }

    /**
     * Method to create an active pagination link to the item
     *
     * @param   JPaginationObject  $item  The object with which to make an active link.
     *
     * @return  string  HTML link
     *
     * @since   1.0
     */
    protected function _item_active(JPaginationObject $item)
    {
        return JLayoutHelper::render('pagination.item.active', $item);
    }

    /**
     * Method to create an inactive pagination string
     *
     * @param   JPaginationObject  $item  The item to be processed
     *
     * @return  string
     *
     * @since   1.0
     */
    protected function _item_inactive(JPaginationObject $item)
    {
        return JLayoutHelper::render('pagination.item.inactive', $item);
    }

But this way the old system is exactly as it was (in fact will be used by the chrome now). Theorically nobody will use the old methods but who knows as they are set as public. So IMO we should touch only what we need.

I have the overrides though so if you are ready to give support to the B/C issues I'll be happy to send it :D

avatar phproberto
phproberto - comment - 19 Nov 2013

Thanks!

Added tracker link and tested it with Isis pagination chromes.

avatar betweenbrain
betweenbrain - comment - 19 Nov 2013

W00T!

avatar wilsonge
wilsonge - comment - 19 Nov 2013

protected function listfooter can be removed as its now being used by the JLayout and as it's a protected function it's not an issue in terms of b/c

I'd also like to add a deprecated log notice in the chrome override section. From 4.0 we should just be using JLayouts imo.

I'm horrendously busy with essay's atm. But I wanna have a think about this - and whether we should be changing all this over at once rather than bit by bit (there are several other protected functions in JPagination containing HTML markup we can be putting into JLayouts)

avatar wilsonge
wilsonge - comment - 6 Feb 2014

Bump. It would be nice to get this into 3.3 (or earlier!). I'll try and find time to test tomorrow afternoon.

avatar wilsonge
wilsonge - comment - 12 Feb 2014

This is awesome :) Just tested it. Can we rebase this to current?

avatar phproberto
phproberto - comment - 14 Feb 2014

I rebased the branch. Closing this to send it against staging.

Thanks George!

avatar phproberto phproberto - close - 14 Feb 2014

Add a Comment

Login with GitHub to post a comment