Sitewide Header Nav Menu duplication!

Permalink
Hi there,

I noticed that the Site Wide Header NAv Menu items were showing up double, so I Logged into the website and it all looks right with only one Menu. The Theme Element Header.php also looks right:

<div id="header-image">
    <!-- Topmost! Header Image Global Area -->
    <?php 
      $a = new Area('Header Image');
      $a->display($c);
   ?>
    <!-- Header Navigation Top Menu Global Area -->
    <?php 
      $a = new GlobalArea('Header Nav');
      $a->display();
   ?>
  </div>
</div>
<div class="clear"></div>


But when I log out again the Menu shows as Double - see image? Using IE as browser - I have cleared my cache settings.

Any ideas?

Fanflame

Fanflame
View Replies: View Best Answer
Fanflame replied on at Permalink Reply 1 Attachment
Fanflame
Sorry forgot to attach the image of the double header menu
Fanflame replied on at Permalink Reply
Fanflame
An update to this would be that if I open the Site in Internet Explorer the HOME page has the correct Sitewide Header Nav Menu but every other page it is duplicated.

If I open the Site in Google Chrome Every page has the Sitewide Header Nav Menu duplicated.

If I sign-in to the site to view it the Site Wide Header Nav Menu shows one and correctly on every page.

I have cleared my cache on both Browsers but this makes no difference?

Does anyone know what I can do?

Your advice is welcomed.

Fanflame
studio108 replied on at Permalink Reply
studio108
Just a quick thing to check as I have made the mistake before. The header code isn't repeated in the selected page template as well? That would cause duplication!

Also if you have added a block in a global area and then for whatever reason changed the area name or removed the area without deleting the block first that can cause the issue.

Just some thoughts...
Fanflame replied on at Permalink Reply
Fanflame
Very thoughtful Studio 88 I will look at the PHP files of each page. I haven't made the change but someone edle may have.

Also on the later point. I did have Breadcrumbs set up but this was removed and I now notice that one the homepage it says 'Home' but not on any other page. Don't really know anything about C5 as this a first build for me.


Thanks for your advice; will update later.

Fanflame
Fanflame replied on at Permalink Reply
Fanflame
Hi Studio 108,

Not it is not that at all, everything seems fine.

I was talking offline to Rony and he suggested the following:

In your theme's header.php, you have
<?php
$a = new GlobalArea('Header Nav');
$a->display();
?>

This is a global area. Previously it was a simple area like:
<?php
$a = new Area('Header Nav');
$a->display($c);
?>

It is a known issue with Concrete5 that an Area name which became global area later, will show double content. But not in a consistent way. So the solution is, change the Global area name to 'Header Menu' or anything else suitable. Then edit any page and add the menu. That will solve this issue.
Fanflame replied on at Permalink Reply
Fanflame
If I rename the GlobalArea to 'Header Menu', will I have to add content to the Typography.css or the Main.css to reflect it?

If I rename it at the moment it just disappears off the homepage. (every page actually) I thought that the reason for having a global area was that you could make a one time change which would then be reflected throughout the site. But If I have to add it to every page type I am replicating my work. And presently nothing will display if I put:
<?php
$a = new GlobalArea('Header Menu');
$a->display($c);
?>

Again, I am sorry to ask these questions but am lost on this as a first time user.
ronyDdeveloper replied on at Permalink Best Answer Reply
ronyDdeveloper
There is nothing to do with typography.css, and obviously you don't need to redo the works. Just change the Global area name, then edit the home page and add the autonav in that new global area. It will be shown in all over the site.

Note: Though I've already did it for you in your site.

Rony
Fanflame replied on at Permalink Reply
Fanflame
Stonking Good Job Rony - You da man! as they say!

Roll on the fixes in the next version!