Joomla page navigation with article title
How to dispay previous and next content with title in Joomla 1.5?
Written by Li   

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
  2. $query = 'SELECT a.id,'
    to
    $query = 'SELECT a.id,a.title,'  
  3. 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);
  4. 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);
  5. Line 177 from

     . JText::_( '<' ) . $pnSpace . JText::_( 'Prev' ) . '</a> 
    to
     .$row->prevTitle. JText::_( '<' ) . $pnSpace . JText::_( 'Prev' ) . '</a> 
  6. 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'.

 




Attachments:
 pageNav1.0.3.zip2 Kb
 
Recommend Read