Hi!
Ich hoffe das ich noch alles zusammenbekomme. ist ja auch schon was her.
also zum einsatz kommen bei mir die ext. gsi_pagenav und die ext. ftrs_subpagenav die auf erstere Aufbaut.
wie ich zugeben muss ist das alles was durcheinander und bestimmt auch sauberer zu lösen, aber nun gut. Man kann das ja noch alles was anpassen.
im constant editor von ftrs_subpagenav steht folgende drin:
für die pointer und next: |
für Previous: | + die Trennzeichen. in meinem fall die -
den wert für next page setzte ich auf weiter, den für Previous auf zurück.
das wars hierbei schon eigentlich soweit. jetzt muss nur noch eine datei angepasst werden und zwar befindet sich die datei im ordner ftrs_subpagenav/pi1 und trägt den titel class.tx_ftrssubpagenav_pi1.php.
diese habe ich wie folgt abgeändert (vielleicht vorher ne sicherungskopie anfertigen).
<?php
/***************************************************************
* Copyright notice
*
* (c) 2004 Futuros Internet Solutions (rick@futuros.nl)
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* Plugin 'Menu of pages (same level)' for the 'ftrs_subpagenav' extension.
*
* @author Futuros Internet Solutions <rick@futuros.nl>
*/
require_once(PATH_tslib."class.tslib_pibase.php");
class tx_ftrssubpagenav_pi1 extends tslib_pibase {
var $prefixId = "tx_ftrssubpagenav_pi1"; // Same as class name
var $scriptRelPath = "pi1/class.tx_ftrssubpagenav_pi1.php"; // Path to this script relative to the extension dir.
var $extKey = "ftrs_subpagenav"; // The extension key.
/**
* [Put your description here]
*/
function main($content,$conf) {
//set parentPid & sorting
$pid = $GLOBALS['TSFE']->page['pid'];
$sorting = $GLOBALS['TSFE']->page['sorting'];
if (!$pid || !$conf['content']) {
return '';
}
//get subpage menu
$exclude_doktypes = '6,199'; // BE user section, spacer
if ($conf['ignoreshortcut']) $exclude_doktypes .= ',4'; // shortcut
if (!$conf['localnotinmenu']) $exclude_doktypes .= ',5'; // not in menu
if (ereg('^[0-9, ]+$',$conf['excludeDoktypes'])) $exclude_doktypes .= ','.$conf['excludeDoktypes'];
$where = " and doktype < 200 and doktype not in ($exclude_doktypes) and nav_hide!=1";
$menu = $GLOBALS['TSFE']->sys_page->getMenu($pid,'uid,pid,title','sorting',$where);
//check if there is a next and previous page. Make links for them.
$p=null; // predecessor
$c=null; // current page
$s=null; // successor
$idx = 0; // page number
$l=""; //list with the pages
foreach ($menu as $m_pid => $m_page) {
$idx++;
$crnt=0;
if (!$c) {
if ($GLOBALS['TSFE']->id == $m_pid){
$c = $m_page;
$crnt = 1;
} else {
$p = $m_page;
}
} else {
if (!$s) {
$s = $m_page;
}
}
if($crnt){
if($s){
$l .= '<b>'.$idx.'</b>';
} else {
$l .= '<b>'.$idx.'</b><span class="text"> - </span>';
}
} else {
$l .= $this->pi_linkToPage($idx, $m_pid, '').'<span class="text"> - </span>';
}
/*if($l){
$l .= ','.$append;
} else {
$l = $append;
}*/
}
if ($p) {
$GLOBALS['TSFE']->register['prev_pid'] = $p['uid'];
$GLOBALS['TSFE']->register['prev_title'] = $p['title'];
}
if ($idx>=2 || (!$conf['twopageminimum'])) {
$GLOBALS['TSFE']->register['pointers_list'] = $l;
}
if ($s) {
$GLOBALS['TSFE']->register['next_pid'] = $s['uid'];
$GLOBALS['TSFE']->register['next_title'] = $s['title'];
}
$content = $this->cObj->cObjGetSingle($conf['content'],$conf['content.']);
return $content;
}
}
if (defined("TYPO3_MODE") && $TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["ext/ftrs_subpagenav/pi1/class.tx_ftrssubpagenav_pi1.php"]) {
include_once($TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["ext/ftrs_subpagenav/pi1/class.tx_ftrssubpagenav_pi1.php"]);
}
?>
das wars dann auch schon. vielleicht geht das alles wie gesagt auch was einfacher, aber ich habe um ehrlich zu sein nicht wirklich plan davon. #paralyzed#
Gruß Thomas