Display Area in Header

Permalink
I have a display area in the header of my custom theme that I would like to be global.

Currently the content has to be set on every page.

Any way around this?

 
chunksmurray replied on at Permalink Reply
chunksmurray
You can break up the header and footer in seperate .php files within your theme. Place them into the \themes\YOUTHEME\elements folder, and then call them from your default.php, or whatever page type you have. Then just add your content into each file.

So to call headers and footers you just include:

$this->inc('elements/header.php'); ?>
&
$this->inc('elements/footer.php'); ?>
into your page type.This way you can set the content in the one file and have it appear across all pages.

Check out the help section for more detail on how to do this. The instructions are really helpful:http://www.concrete5.org/help/building_with_concrete5/developers/th...
frz replied on at Permalink Reply
frz
check out defaults in page types from your dashboard.
jantony replied on at Permalink Reply
Okay, I created an elements\autonav.php file:
<?php 
$a = new Area('Auto-Nav');
$a->display($c);
?>

and my default.php has an include:
<?php  $this->inc('elements/autonav.php'); ?>


So when I create a new page, in edit mode I see "Add to Auto-Nav" where I can specify the block to add, but I still have to add that block for each new page.

Can I add a block at a global level so that block & custom template will then be shown on each new page? My use case is to display breadcrumbs on each page without making the user add it each time. Thanks!
jantony replied on at Permalink Reply
Never mind. I just watched your screencast on Scrapbook & Defaults and answered how to do it. Thanks - I'm loving Concrete5!