Okaloma & Video Forum

Okaloma & Video Forum (https://okaloma.com/index.php)
-   X-Mentor (Archiv) (https://okaloma.com/forumdisplay.php?f=51)
-   -   unterschiedliche footer (https://okaloma.com/showthread.php?t=2240)

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 19:52 Uhr.

SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc. (Unregistered)

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