? Success

User tests: Successful: Unsuccessful:

avatar smehrbrodt
smehrbrodt
5 Jun 2014

Added ability to add the title of the next content item to the template.
I didn't change the template to not change existing sites.

http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=32413&start=0

avatar smehrbrodt smehrbrodt - open - 5 Jun 2014
avatar smehrbrodt smehrbrodt - change - 5 Jun 2014
Title
Show Content title in Page Navigation
[#32413] Show Content title in Page Navigation
avatar smehrbrodt
smehrbrodt - comment - 15 Jul 2014

(OUTDATED - see comment below)
How to test this:
1. Enable Show Navigation in Joomla Article options
2. Open plugins/content/pagenavigation/tmpl/default.php
3. Replace JText::_('JPREV') with $row->prev_title
4. Replace JText::_('JNEXT') with $row->next_title
5. Check that when you open an article in the frontend, the buttons at the bottom have the text of the next/previous article.
bildschirmfoto vom 2014-07-15 13 57 43

avatar Bakual
Bakual - comment - 15 Jul 2014

I think it would be nice if we could choose what to show in the plugin params.
Have it default to the current prev/next behavior and change the default layout accordingly.

Then this PR would be great!

avatar smehrbrodt
smehrbrodt - comment - 15 Jul 2014

Thanks for your suggestion, I have added the plugin param.

So new testing instructions are:
1. Enable Show Navigation in Joomla Article options
2. Go to Plugin Manager -> Content - Page Navigation
3. Check that changing the option "Link text" does change the page navigation links below an article.

avatar betweenbrain
betweenbrain - comment - 15 Jul 2014

Tested and works as described. Nice work!

When I first read the title of this PR, I expected the option to be able to do something like 'Next' versus 'Next: Second Blog Post'. What are your thoughts on something like that? I do like this option as well, so I'm fine either way.

avatar betweenbrain
betweenbrain - comment - 15 Jul 2014

PS: Also a :+1: for consistent implementation of the chevron.

Before:

screenshot - 07152014 - 12 51 31 pm

After:

screenshot - 07152014 - 12 52 07 pm

avatar Bakual
Bakual - comment - 15 Jul 2014

Please alpha-order the language strings.

avatar smehrbrodt
smehrbrodt - comment - 15 Jul 2014

When I first read the title of this PR, I expected the option to be able to do something like 'Next' versus 'Next: Second Blog Post'. What are your thoughts on something like that?

I think that the arrows are enough to indicate that the links are pointing to the next/previous post. So I would prefer only the title.

avatar Bakual
Bakual - comment - 15 Jul 2014

@infograf768 Was there a special reason we used the language strings JGLOBAL_GT and JGLOBAL_LT for this? Maybe RTL languages?

avatar smehrbrodt
smehrbrodt - comment - 16 Jul 2014

I just checked the arabic language pack and it doesn't have a different symbol in the JGLOBAL_GT and JGLOBAL_LT strings:
./ar-AA.ini:328:JGLOBAL_GT=">"
./ar-AA.ini:357:JGLOBAL_LT="<"

So I think it should be safe to replace them with the icons.

avatar infograf768
infograf768 - comment - 16 Jul 2014

Issue in RTL
Before:
screen shot 2014-07-16 at 18 02 09

After:
screen shot 2014-07-16 at 17 59 08

avatar Bakual
Bakual - comment - 16 Jul 2014

So instead of <?php echo '<i class="icon-chevron-left"></i> ' . $row->prev_label; ?> use something like

<?php $lang = JFactory::getLanguage();
$direction = $lang->isRTL() ? 'right' : 'left';
echo '<i class="icon-chevron-' . $direction . '"></i> ' . $row->prev_label;

(not tested)

avatar smehrbrodt
smehrbrodt - comment - 16 Jul 2014

I've fixed the RTL issue, can you please test again?

avatar Bakual
Bakual - comment - 16 Jul 2014

Yep, looks fine to me now.
Setting RTC as we have two tests.

avatar Bakual Bakual - reference | 2004fdb - 8 Aug 14
avatar Bakual
Bakual - comment - 8 Aug 2014

Merged into 3.4-dev. Thanks!

avatar Bakual Bakual - change - 8 Aug 2014
Status New Closed
Closed_Date 0000-00-00 00:00:00 2014-08-08 20:51:20
avatar Bakual Bakual - close - 8 Aug 2014
avatar Bakual Bakual - close - 8 Aug 2014

Add a Comment

Login with GitHub to post a comment