';
// adds navigation between pages to bottom of text
if ( $hasToc ) {
createNavigation( $row, $page, $n );
}
// page links shown at bottom of page if TOC disabled
if (!$hasToc) {
$row->text .= $pageNav->writePagesLinks( 'index.php?option=com_content&task=view&id='. $row->id .'&Itemid='. $Itemid );
}
$row->text .= '
| '
. _TOC_JUMPTO .
' |
';
// TOC First Page link
$row->toc .= '
|
'
. $heading .
'
|
';
$i = 2;
$args2 = array();
foreach ( $matches as $bot ) {
$link = $nonseflink .'&limit=1&limitstart='. ($i-1);
$link = sefRelToAbs( $link );
if ( @$bot[2] ) {
parse_str( html_entity_decode( $bot[2] ), $args2 );
if ( @$args2['title'] ) {
$row->toc .= '
|
'
. stripslashes( $args2['title'] ) .
'
|
';
} else {
$row->toc .= '
|
'
. _PN_PAGE .' '. $i .
'
|
';
}
} else {
$row->toc .= '
|
'
. _PN_PAGE .' '. $i .
'
|
';
}
$i++;
}
$row->toc .= '
';
}
function createNavigation( &$row, $page, $n ) {
global $Itemid;
$link = 'index.php?option=com_content&task=view&id='. $row->id .'&Itemid='. $Itemid;
if ( $page < $n-1 ) {
$link_next = $link .'&limit=1&limitstart='. ( $page + 1 );
$link_next = sefRelToAbs( $link_next );
$next = '' . $prev . ' - ' . $next .'
';
}
?>