00001 <?php 00002 // --------------------------------------------------------------------------- 00003 // $Id$ 00004 // --------------------------------------------------------------------------- 00005 // OpenRat Content Management System 00006 // Copyright (C) 2002 Jan Dankert, jandankert@jandankert.de 00007 // 00008 // This program is free software; you can redistribute it and/or 00009 // modify it under the terms of the GNU General Public License 00010 // as published by the Free Software Foundation; either version 2 00011 // of the License, or (at your option) any later version. 00012 // 00013 // This program is distributed in the hope that it will be useful, 00014 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 // GNU General Public License for more details. 00017 // 00018 // You should have received a copy of the GNU General Public License 00019 // along with this program; if not, write to the Free Software 00020 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00021 // --------------------------------------------------------------------------- 00022 // $Log$ 00023 // Revision 1.2 2005-01-04 19:59:55 dankert 00024 // Allgemeine Korrekturen, Erben von "Dynamic"-klasse 00025 // 00026 // Revision 1.1 2004/11/10 22:43:35 dankert 00027 // Beispiele fuer dynamische Templateelemente 00028 // 00029 // --------------------------------------------------------------------------- 00030 00031 00032 00037 class PagesNavigation extends Dynamic 00038 { 00043 var $parameters = Array( 00044 'arrowChar'=>'String between entries' 00045 ); 00046 00047 00048 var $arrowChar = ' · '; 00049 00054 var $description = 'Creates a page navigation.'; 00055 var $version = '$Id$'; 00056 var $api; 00057 00058 // Erstellen des Hauptmenues 00059 function execute() 00060 { 00061 // Lesen des Root-Ordners 00062 $folder = new Folder( $this->page->parentid ); 00063 00064 $nr = 0; 00065 // Schleife ueber alle Inhalte des Root-Ordners 00066 foreach( $folder->getObjects() as $o ) 00067 { 00068 $nr++; 00069 if ( $o->isPage || $o->isLink ) 00070 { 00071 if ( $o->objectid != $this->page->objectid ) 00072 $this->output( '<a href="'.$this->page->path_to_object($oid).'" title="'.$o->desc.'" class="pagenav">'.$nr.'</a>' ); 00073 else 00074 $this->output( '<strong>'.$nr.'</strong>' ); 00075 } 00076 } 00077 } 00078 }
1.5.8