';
// adds navigation between pages to bottom of text
if ( $hasToc ) {
plgContentCreateNavigation( $row, $page, $n );
}
// page links shown at bottom of page if TOC disabled
if (!$hasToc) {
$row->text .= $pageNav->getPagesLinks();
}
$row->text .= '
'
. JText::_( 'Article Index' ) .
' |
';
// TOC First Page link
$row->toc .= '
'
. $heading .
'
|
';
$i = 2;
foreach ( $matches as $bot )
{
$link = JRoute::_( '&showall=&limitstart='. ($i-1) );
if ( @$bot[0] )
{
$attrs2 = JUtility::parseAttributes($bot[0]);
if ( @$attrs2['alt'] )
{
$title = stripslashes( $attrs2['alt'] );
}
elseif ( @$attrs2['title'] )
{
$title = stripslashes( $attrs2['title'] );
}
else
{
$title = JText::sprintf( 'Page #', $i );
}
}
else
{
$title = JText::sprintf( 'Page #', $i );
}
$row->toc .= '
'
. $title .
'
|
';
$i++;
}
// Get Plugin info
$plugin =& JPluginHelper::getPlugin('content', 'pagebreak');
$params = new JParameter( $plugin->params );
if ($params->get('showall') )
{
$link = JRoute::_( '&showall=1&limitstart=');
$row->toc .= '
'
. JText::_( 'All Pages' ) .
'
|
';
}
$row->toc .= '
';
}
function plgContentCreateNavigation( &$row, $page, $n )
{
$pnSpace = "";
if (JText::_( '<' ) || JText::_( '>' )) $pnSpace = " ";
if ( $page < $n-1 )
{
$page_next = $page + 1;
$link_next = JRoute::_( '&limitstart='. ( $page_next ) );
// Next >>
$next = '' . $prev . ' - ' . $next .'
';
}