Wiccle.com in Facebook Wiccle.com in Twitter Wiccle.com in LinkedIn Wiccle.com in Youtube RSS from Wiccle.com Wiccle.com in Atom
 
 
 

Thread: Global Header only displays when in admin area. [Solved]

Started: March 4, 2010, 09:39 PM  ⋅  Zone: Public Forums  ⋅  Category: Bugs & Troubleshooting  ⋅  Posts: 4  ⋅  Views 571
Started by: john  ⋅  Description: To solve this, simply check your module settings for a module-specific custom header that overrides it.
Post #1
Member: john  ⋅  Date: March 4, 2010, 09:39 PM  ⋅ Subject: "Global Header only displays when in admin area."

I created a global header (admin panel >> site >> Header & Footer) - it displays fine when I'm in the admin panel (ie. everything shifts down and the header displays exactly as it should). When I get out of the admin panel, into normal site view, the header does not display (nothing shifts down to allow the header to display).

Could this be caused by my CSS changes or is it a software issue?

Post #2
Member: Markus  ⋅  Date: March 4, 2010, 10:08 PM  ⋅ Subject: "Re: Global Header only displays when in admin area."

In the default 1.2x template, you have at #370 in skin_wrappers.php the following lines:

            <div id="site_header">
                [[SITE_HEADER]]
            </div>

Double check that you have that in place in your template. Also double check that you don't have a separate module header (Modules > X Module > Module Header) defined (must be zero length), as that would override the default site header on a per-module basis.

If you want to find out more about how the page is composed, open up wrapper.php and skim it through; the site custom header is handled at lines #93-105 there. If none of this helps, let me know and I'll research further.

Also, in the event that the site header or some other change you do in the Admin CP doesn't change immediately, head to Home > Reboot to reload your current session cache.

Post #3
Member: john  ⋅  Date: March 4, 2010, 11:01 PM  ⋅ Subject: "Re: Global Header only displays when in admin area."

Thanks for that Markus! My problem was easy enough to find - I had a module header in Site - simply removed that and global header now works fine.

What is somewhat strange is that the html in Site module header had been commented out (<!--xxxx-->) - and even though the html didn't display, it still had an impact??? Oh well, that's way above my tiny head. I'm just happy it works Smile

 

Post #4
Member: Markus  ⋅  Date: March 5, 2010, 01:11 AM  ⋅ Subject: "Re: Global Header only displays when in admin area."

It's actually not that complicated; the system simply checks if your custom module header is longer than nothing. If there's outcommented code, it still registers as over zero characters, and takes precedence.

Actually now that I look at it, what the code says is:

    if (strlen($_SESSION['module']['module_header']) > 1)

Or, if string length in module_header is greater than 1, then we take it in. (I suppose I left it at one in case someone forgets a single space there.) The outcommented code must be residue from your older installations, as it isn't there in the 1.20 default install. We ditched the "Wiccle Blogs" etc. banners with 1.20 to keep things simple and tidy.

By the way, in the event that you want to change the location of your custom header, simply move the snippet I noted in the earlier post anywhere you wish within the $skin['page_html_wrapper']. If you want to further control its display, you can add a definition for #site_header in your CSS files (such as wrappers.css).

 

Bugs & Troubleshooting

Add to Favorites
Public Forums
Category  ⋅  Please report all bugs and discuss any problems in this forum.
 

Public Forums

Add to Favorites
Public Forums
Zone  ⋅ Public forum sections for support and discussions. Available for everyone.
 

Zone Categories

 
Questions? Ask us!
Back to Top