Boardunity & Video Forum

Boardunity & Video Forum (https://boardunity.de/)
-   X-Mentor (Archiv) (https://boardunity.de/x-mentor-archiv-f51.html)
-   -   unterschiedliche footer (https://boardunity.de/unterschiedliche-footer-t2240.html)

dblum 09.08.2004 12:04

unterschiedliche footer
 
genau wie mit den unterschiedlichen kategorien-templates (s. separaten thread) möchte ich auch kategorieabhängige footer oder header realisieren. im ersten ansatz habe ich die function footer wie folgt erweitert:
Code:

    function footer($array = array())
    {

        if($GLOBALS['Template']->fileexists("footer_".$id)){
            return $GLOBALS['Template']->load('footer_'.$id, $array);
        }
        else {
            return $GLOBALS['Template']->load('footer', $array);
        }
    }

Jedoch scheint die catid in dieser funktion nicht bekannt zu sein. wie kann ich die dort abfragen?

grüße
denis

Patrick Gotthardt 09.08.2004 13:16

PHP-Code:

    function footer($array = array())
     {
         
$id = isset($_GET['catid']) ? $_GET['catid'] : 0;
         if(
$GLOBALS['Template']->fileexists("footer_".$id)){
             return 
$GLOBALS['Template']->load('footer_'.$id$array);
         }
         else {
             return 
$GLOBALS['Template']->load('footer'$array);
         }
     } 


dblum 09.08.2004 13:26

funktioniert...!
Danke..

Patrick Gotthardt 09.08.2004 14:15

Freut mich. :)


Alle Zeitangaben in WEZ +1. Es ist jetzt 11:33 Uhr.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25