Can I have every page header the same without adding block to them all?
Permalink
So I have a header file that looks like
And every page will use this header as follows
My question is there a way for all pages that use this header to already have a auto-nav block or any other block already there without out me having to do it manually?
Thank You
<?php defined('C5_EXECUTE') or die(_("Access Denied.")); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <style type="text/css" media="screen">@import "<?php echo $this->getStyleSheet('default.css')?>";</style> <?php Loader::element('header_required'); ?> <?php $cp = new Permissions($c); if($cp->canWrite() && $cp->canAddSubContent()){ echo('<style type="text/css">body{background-position:0px 49px;}</style>'); }?> </head> <body> <div id="banner"> </div>
Viewing 15 lines of 18 lines. View entire code block.
And every page will use this header as follows
<?php $this->inc('elements/header.php'); ?>
My question is there a way for all pages that use this header to already have a auto-nav block or any other block already there without out me having to do it manually?
Thank You
I would also look into Page Type Defaults. These allow you to setup a 'default' block on any of your theme's page types. That means that your block will automatically be there when you create new pages using that page type. This also allows you to setup that block on "Child Pages" or pages that already exist.
http://www.concrete5.org/community/forums/customizing_c5/hardcoded-...
http://www.concrete5.org/community/forums/usage/question-about-page...
http://www.concrete5.org/community/forums/themes/perist-autonav-tem...
(if those don't provide enough info for you, try searching around some more -- this is a very common task so there are lots of posts about it).
Good luck!