Status: offline

destr0yr

Forum User
Full Member
Registered: 07/06/02
Posts: 324
How would I create a CUSTOM_siteHeader? Is it possible?

I remember reading about it, however, have forgotten and can't find the topic. From what I understand, if I copy the existing COM_siteHeader from lib-common.php and paste that into function.php in the layout/themename folder and rename it to THEMENAME_siteHeader, that should work, right?
-- destr0yr
"I love deadlines. I like the whooshing sound they make as they fly by." -- Douglas Adams

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
"Use the source, Luke"

In function COM_siteHeader in lib-common.php, you'll find:
Text Formatted Code
    // If the theme implemented this for us then call their version instead.

    $function = $_CONF['theme'] . '_siteHeader';

    if( function_exists( $function ))
    {
        return $function( $what );
    }
 

And yes, your function should go into your theme's functions.php

bye, Dirk

Status: offline

destr0yr

Forum User
Full Member
Registered: 07/06/02
Posts: 324
Hmm... I used function XSilver_siteHeader( $what = 'menu' ) (just testing with XSilver) and get page cannot be displayed...

[edit]
nm, i figured it out. i removed the code that you pasted above from my copied function.
-- destr0yr
"I love deadlines. I like the whooshing sound they make as they fly by." -- Douglas Adams

Status: offline

destr0yr

Forum User
Full Member
Registered: 07/06/02
Posts: 324
as always, thanks again Dirk.
-- destr0yr
"I love deadlines. I like the whooshing sound they make as they fly by." -- Douglas Adams