What for do I need the header.php?

Permalink
Hi!

I am new to concrete5 and PHP, I only worked with bootstrap and static websites before. I have difficulties designing the navbar.

In my main.php file I have this code for the header:

<div id="menu" class="row">
<?php
$a = new Area('Header Nav');
$a->setBlockLimit(1);
$a->display($c);
?>
</div>

In edit mode I can just add the Auto-Nav block for the Navbar to appear.

I want to, however, insert a logo image, which I don#t know how to.

I read everywhere stuff about the header.php, but what is that and for what do I need it if the Auto Nav block is defined in my main.php?

Thanks!

 
hutman replied on at Permalink Reply
hutman
The header.php is not required, it's just handy if you have multiple templates that all have a common header/footer to break those pieces out into alternate files then include them in the template. If you download the Clonemental (free) package you can look at how the theme is structured to get a better idea of what goes where.

http://www.concrete5.org/marketplace/themes/cloneamental...

Also, this line "$a->setBlockLimit(1);" makes it so that you can only add 1 block to that particular area, so you won't be able to add both your nav and your logo into the same area.
monikac replied on at Permalink Reply
Oh thank you, i didn't know what that meant, just copied it from somewhere!