I am new to c5 and trying to set up a new site. I am using the colneamental theme.
I would like to move the sitewide header navigation block below the sitewide header title and sitewide header search, so that the sitewide header navigation block can use the full width of the webpage.
I have edited the packages/cloneamental/themes/cloneamental/elements/header.php to make a new row below and insert the sitewide header navigation block. This works, however the original sitewide header navigation block in the middle column is still in place and when I insert the auto-nav block I get 2 menus in the header.
How is it possible to remove the sitewide header navigation block in the middle column ? I assume there is another file that overrides the cloneamental header.php file.
Can anyone help me ?
Thanks for your reply, I double checked everything and now I no longer have 2 “sitewide navigation blocks” (maybe I did not refresh my browser when I did the original changes.)
Now that I have my sitewide navigation block as I want it I am not sure how to handle the middle column, sorry about this I am not a programmer.
My code is attached
<?php defined('C5_EXECUTE') or die("Access Denied."); $this->inc('elements/header_top.php'); $as = new GlobalArea('Header Search'); $blocks = $as->getTotalBlocksInArea(); $displayThirdColumn = $blocks > 0 || $c->isEditMode(); ?> <header> <div class="container"> <div class="row"> <div class="col-sm-4 col-xs-6"> <?php $a = new GlobalArea('Header Site Title'); $a->display(); ?> </div>
Is it ok to leave this middle column blank as above? or could I put the nav language switch in this space ? (in the same row as the site title and search).
At the moment when in edit mode and I try to put the nav language switch in the middle column the "nav switch" block makes a new row below the the site title and above my new sitewide navigation block. So I guess I need some code in the middle column
$a = new GlobalArea('Header Middle Column'); $a->display();
That code creates a new "area" which is where you can place blocks. If there is no area you can't place a block there. Each area has to have a unique name (value in the quotes).