Editing a 'block which is contained within a global area'

Permalink
Hi people,

The main logo on my site appears on every page. I need to use a different logo for a different 'sub service' on at least one other page. When I try to edit it, I am told "This block is contained within a global area. Changing its content will change it everywhere that global area is referenced."
Can anyone tell me how I can change the logo (use a different file) on one page without it affecting all the others?
Thank you :-)

 
goldhat replied on at Permalink Best Answer Reply
You won't be able to achieve this using a global area. You could make a page type where you replace that global area with a regular area, then you'll be able to put a different logo into that area on the pages that need it.

The whole point of global areas is they are the same everywhere. But you don't have to use them in every page type. So if most of your site has the same logo, then a global area is great but you need a page type without it for any variations.
mhawke replied on at Permalink Reply
mhawke
I can think of a couple of ways but they all involved editing the php files in your theme folder. If it were my site, here's what I would do. It takes a minute to get your head around it but it works well.

Create a 'Text' page attribute with a handle of 'logo_area_name' and a name of 'Logo Area Name'.

Replace the Global Area code in your header.php file that displays your logo with this code:

<?php
$a = new GlobalArea($c->getAttribute('logo_area_name')?$c->getAttribute('logo_area_name'):"LOGO");
$a->display();
?>


Replace the "LOGO" part with the current name of your Global Area that holds your logo.

On a sub-services page where you want a different logo (e.g. Plumbing) add the 'Logo Area Name' attribute to your page with a value that represents the sub-service such as 'Plumbing Logo'.

As soon as you put this page into Edit Mode, the name of the Global Area will change to 'Add to Sitewide Plumbing Logo' and a Stack called 'Plumbing Services Logo' will be created automatically.

This will let you add as many special logos as you need.
craigyconga replied on at Permalink Reply
Thank you for your info. I'll have a look at this, may be above my pay grade ;-)
mhawke replied on at Permalink Reply
mhawke
If you need any help with this technique, send me a Private Message and I'll help you set it up free of charge. It really is simpler than it sounds on paper.
LionelQ replied on at Permalink Reply
I placed images on the global area and have removed them. They don't show when the page is in edit mode, but as soon as you log off, they begin to show again. I've cleared cache, but they still won't go. How can I remove these logos.
mhawke replied on at Permalink Reply
mhawke
That sounds like you haven't 'Approved Changes' in the Global Area. Try re-editing the Global Area and make sure you approve the changes after you're done. When you're logged in as the SuperUser, you will always see the most recent version you have created (i.e. no images) but when you log out, you will see the most recent approved version.
LionelQ replied on at Permalink Reply
Thanks for the suggestion, but I've also tried approving the latest version and still no change.
mhawke replied on at Permalink Reply
mhawke
If you log out and keep refreshing your page, does the Global Area toggle between the two versions?
eenglishkr replied on at Permalink Reply
I am really a novice beginner. But I tried to do what you specified.
My question is where is my theme folder and how I can create a 'Text' page attribute with...

Could you be kind to explain it step by step? I am using the latest version and the Edit popup seems to be different from yours.

Thank you in advance.
mhawke replied on at Permalink Reply
mhawke
Are you using version 5.7?
eenglishkr replied on at Permalink Reply
yes. Downloaded the latest one.
Do I have to use a different method?
Please help me to edit my home page.

You are very kind!
mhawke replied on at Permalink Reply
mhawke
This discussion has changed since the original question was asked. What issue are you having with your Home page?
eenglishkr replied on at Permalink Reply 1 Attachment
I am trying to edit the following block showing

Services PortfolioTeam About.Careers Frequently Asked Questions BlogContact

But this block is in the global area, I am not allowed to change the names.
Concrete5.7 does not allow me to change them?
I would like to know how to modify the names.

Thanks in advance
mhawke replied on at Permalink Reply
mhawke
Well this is a completely different question. This thread already has two topics going so I would recommend that you start a new discussion thread so we can keep it separate.