<?php $newId = $modx->documentIdentifier +1; $link = $modx->makeUrl($newId); return $link; ?>
<?php
$mnuidx = $modx->db->getValue('SELECT MAX(menuindex)+1 as \'mnuidx\' FROM '.$modx->getFullTableName('site_content').'');
if ($mnuidx<1) $mnuidx = 0;
$newId = $modx->($munidx +1);
$link = $modx->makeUrl($newId);
return $link;
?><?php
$prev = $current-1;
$next = $current+1;
$children = $etomite->getActiveChildren($parentid, $sortBy, $sortHow, $fields);
$limit = count($children);
// Prev item
if($prev > 0 && $displayTitle==false){
$PJN_prevPlaceHolder = "<a href='[~".$my_array[$prev]['id']."~]'>".$prevText."</a>";
} elseif($prev > 0 && $displayTitle==true) {
$PJN_prevPlaceHolder = "<a href='[~".$my_array[$prev]['id']."~]'>".$my_array[$prev]['pagetitle']."</a>";
} elseif($prev <= 0 && $displayNoPrevNext == true) {
$PJN_prevPlaceHolder = $noPrevNextText;
}
// Next item
if($next <= $limit && $displayTitle==false){
$PJN_nextPlaceHolder = "<a href='[~".$modx[$next]['id']."~]'>".$nextText."</a>";
} elseif($next <= $limit && $displayTitle==true) {
$PJN_nextPlaceHolder ="<a href='[~".$modx[$next]['id']."~]'>".$my_array[$next]['pagetitle']."</a>";
} elseif($next > $limit && $displayNoPrevNext == true) {
$PJN_nextPlaceHolder = $noPrevNextText;
}
if ($usePlaceHolder==false) {
// Here starts the output
$output = "";
$output .= "<div class='PJN_Menu'>";
if($displayFixed==true) {
$output .= $PJN_firsPlaceHolder." < ";
}
$output .= $PJN_prevPlaceHolder." | ";
if($useJump) {
$output .= $PJN_jumpPlaceHolder." | ";
} else {
$output .= $PJN_indexPlaceHolder." | ";
}
$output .= $PJN_nextPlaceHolder;
if($displayFixed==true) {
$output .= " > ".$PJN_lastPlaceHolder;
}
$output .= "</div>";
return $output;
}
else {
// Set PlaceHolder
$modx->setPlaceholder('PJN_first',"<span class='PJN_Menu'><span class='PJN_First'>".$PJN_firsPlaceHolder."</span></span>");
$modx->setPlaceholder('PJN_prev',"<span class='PJN_Menu'><span class='PJN_Prev'>".$PJN_prevPlaceHolder."</span></span>");
$modx->setPlaceholder('PJN_jump',"<span class='PJN_Menu'><span class='PJN_Jump'>".$PJN_jumpPlaceHolder."</span></span>");
$modx->setPlaceholder('PJN_index',"<span class='PJN_Menu'><span class='PJN_Indext'>".$PJN_indexPlaceHolder."</span></span>");
$modx->setPlaceholder('PJN_next',"<span class='PJN_Menu'><span class='PJN_Next'>".$PJN_nextPlaceHolder."</span></span>");
$modx->setPlaceholder('PJN_last',"<span class='PJN_Menu'><span class='PJN_Last'>".$PJN_lastPlaceHolder."</span></span>");
}
?>