Joomla Resources

  • Increase font size
  • Default font size
  • Decrease font size

show pre and next content with title Plus

Joomla 1.5's page navigation display the previous and next content without content title.
This article will help you display the previous and next content with title in an easy way.

Open file $Joomla_base/plugins/content/pagenavigation.php.

1.Change line 109 from

$query = 'SELECT a.id,'

to

$query = 'SELECT a.id,a.title,'
2.Line 153 from
$row->prev = JRoute::_('index.php?option=com_content&view=article&catid='.$row->prev->catslug.'&id='.$row->prev->slug); 

to

$row->prevTitle=$row->prev->title;
    $row->prev = JRoute::_('index.php?option=com_content&view=article&catid='.$row->prev->catslug.'&id='.$row->prev->slug);

3.Line 159 from

$row->next = JRoute::_('index.php?option=com_content&view=article&catid='.$row->next->catslug.'&id='.$row->next->slug); 
to
$row->nextTitle=$row->next->title;
$row->next = JRoute::_('index.php?option=com_content&view=article&catid='.$row->next->catslug.'&id='.$row->next->slug);

4.Line 177 from

. JText::_( '<' ) . $pnSpace . JText::_( 'Prev' ) . '</a> 

to

 .$row->prevTitle. JText::_( '<' ) . $pnSpace . JText::_( 'Prev' ) . '</a> 

5.Line 196 from

. JText::_( 'Next' ) . $pnSpace . JText::_( '>' ) .'</a> 

to

. JText::_( 'Next' ) . $pnSpace . JText::_( '>' ).$row->nextTitle .'</a>

Or you can just download the PageNav plugin from attachment.

To make the plugin work you should

1. Disable the default PageNavigation and enable PageNav.

2. Content-->Article Manager-->Parameters-->Show Navigation. Please select 'Show'.

Permanent URL: http://www.eboga.org/pagenav.html