? Pending

User tests: Successful: Unsuccessful:

avatar AndySDH
AndySDH
16 Mar 2017

Since the navigation for multi-page articles (plugins/content/pagebreak.pagebreak.php) can't be template-overridden (unlike the article navigation in pagenavigation.php, which can), we could make some basic improvements to it in the core. This is what I did for my site and I think could be beneficial in general:

  • Add CSS classes to the prev/next links, so they can be stylized via CSS. Currently they have no class.

  • When we are on the first page, there is little point in showing a blank unclickable "prev" link. Same thing for when we are on the last page and the "next link", I think they shouldn't be shown at all.

  • Technically, it would be ideal to use (create) a different language string for these next/prev links, as they are not the generic next/prev article links, but they represent next page/previous page. By having a different language string (like JPREV_PAGE and JNEXT_PAGE) we can individually value these as "PREV PAGE" and "NEXT PAGE".

Summary of Changes

  • Added "prev_page" and "next_page" class
  • Added span around text
  • Removed previous link when on first page, and next link when on last page
  • Changed language string so that is different from the normal JPREV and JNEXT

Of course, if we do this, an additional language string with "PREV PAGE" and "NEXT PAGE" respectively should be created.

This is my first pull request and I had a hard time figuring out how to set it up so excuse any possible mistake.

avatar AndySDH AndySDH - open - 16 Mar 2017
avatar AndySDH AndySDH - change - 16 Mar 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 16 Mar 2017
Category Front End Plugins
avatar AndySDH AndySDH - change - 16 Mar 2017
Labels Added: ?
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 16 Mar 2017

@AndySDH do you have Test Instructions? Congrats to your first PR.

avatar AndySDH
AndySDH - comment - 16 Mar 2017

I don't have any specific test instructions as there are just display changes or underlying code changes, as in, there is not much to "test" :D

avatar AndySDH
AndySDH - comment - 26 Jul 2017

Hello, what is the status of this small fix being added? Newer and newer Joomla updates keep coming out yet this keeps seeming to be left out, so I'm finding myself to always having to core-override it on each update.
Thanks :)

avatar brianteeman
brianteeman - comment - 9 Sep 2017

Nothing has happened because no one has tested it.

avatar Quy Quy - test_item - 14 Sep 2017 - Tested unsuccessfully
avatar Quy
Quy - comment - 14 Sep 2017

I have tested this item ? unsuccessfully on 320538e

Missing language strings.

On first page:
Notice: Undefined variable: prev in C:\xampp\htdocs\joomla-cms\plugins\content\pagebreak\pagebreak.php on line 378

On last page:
Notice: Undefined variable: next in C:\xampp\htdocs\joomla-cms\plugins\content\pagebreak\pagebreak.php on line 378


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/14670.

avatar AndySDH
AndySDH - comment - 14 Sep 2017

Of course, if we do this, an additional language string with "PREV PAGE" and "NEXT PAGE" respectively should be created.

As I did mention, the language strings should of course be created, if someone with more wisdom with their locations and correct placements can add them to the correct language file for this PR, it would be appreciated, as I'm not familiar with the conventions you guys use there.

avatar Quy
Quy - comment - 4 Jan 2018

$prev and $next have to be initialized.

JNEXT and JPREV are located in \administrator\language\en-GB\en-GB.ini and \language\en-GB\en-GB.ini so the new strings should be added to these files.

avatar AndySDH
AndySDH - comment - 5 Jan 2018

Thank you.
I created a new Pull Request which is fully-working now that I gained more knowledge on how the PR work.
This is the new one: #19303, which is also updated to the current Joomla version.
I'm closing this since it's obsolete.

avatar AndySDH AndySDH - change - 5 Jan 2018
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2018-01-05 13:49:24
Closed_By AndySDH
avatar AndySDH AndySDH - close - 5 Jan 2018

Add a Comment

Login with GitHub to post a comment