Global Header?
Permalink Browser Info Environment
I found the info on getting the Global Footer Stacks to work. The Header seems different however. Can you please help me figure this part out. Thanks!
Type: | Discussion |
---|---|
Status: | New |
Help figuring what out? Can you give me more details. Thanks.
How do I "turn it on" like I had to with the footer stacks (by making those two small changes in footer.php) so that my pages will use the header global stack?
Look for the code that defines the Header Top area in the theme's header.php file (located at packages/theme_slate/themes/slate/elements/header.php):
And change it to this:
<?php $a = new Area('Header Top'); $a->display($c); ?>
And change it to this:
<?php $a = new GlobalArea('Header Top'); $a->display(); ?>
If it was a snake it woulda bit me... Sorry to make you repeat yourself! :)
However, now that I've made the change, it is still not displaying the text in the 'Header Top'. I did have to a 'Header Top' stack. Anyway, here's what I have in my header.php
However, now that I've made the change, it is still not displaying the text in the 'Header Top'. I did have to a 'Header Top' stack. Anyway, here's what I have in my header.php
<header> <div id="logo"> <?php $stack = Stack::getByName('Site Name');?> <a <?php if ( !($stack) ) { ?>id="logo-text"<?php } ?> href="<?php echo DIR_REL?>/" title="<?php echo SITE?>"><?php if($stack) $stack->display(); else echo SITE;?></a> </div><!-- #logo ends --> <div id="header-area"> <?php $a = new GlobalArea('Header Top'); $a->display(); ?> </div><!-- #header-area ends --> </header><!-- header ends --> <nav> <?php $bt = BlockType::getByHandle('autonav');
Viewing 15 lines of 29 lines. View entire code block.
Try clearing your site cache. Dashboard->System & Settings->Clear Cache.
Got it!
I have to apologize again (apparently I've been working too much this week) - I didn't see the 'Header Top' that already existed (probably because it was below the footer stacks), so I had created another one - that was the problem! Sorry and thank you!!
I have to apologize again (apparently I've been working too much this week) - I didn't see the 'Header Top' that already existed (probably because it was below the footer stacks), so I had created another one - that was the problem! Sorry and thank you!!
No problem - glad you got it figured out!