Hello, I’m learning about concrete by creating a barebones theme. I’ve got it loaded, but for some reason when I go to the home page, I see all sorts of content areas that are not a part of my theme/template.
As far as I can tell the only Areas that should exist are in my ‘full.php’ (default includes this) which has:
defined('C5_EXECUTE') or die('Access Denied.');
$a = new Area('Page Header');
$a = new Area('Main');
(there are no Area creations in the the header or footer).
The core version is Concrete5 packaged by Bitnami 9.0.2-17
The theme is one I’ve created from scratch in order to both learn how Concrete works, and to assure myself that I can design a site without Concrete getting in the way. (At the moment it seems to be inserting all sorts of things not in the template).
If your theme does not close all tags in the main area correctly, then html will think the footer is actually part of the main area.
Your browser will close the footer because its helpful and repairs broken html.
If you got to this stage by installing sample content then deleting it, then its back to my initial suggestion, that you have a layout that wasn’t deleted.
ok but this isn’t a very helpful answer for a number of reasons:
It could happen outside of ‘learning’. In the real world if I were a theme designer, I might send a theme to someone who has a live site where they’ve done stuff. How can I as a theme designer, ensure that some long ago deleted block in a content area no longer even used by my theme doesn’t forevermore insert 7 orphaned content areas?
Either there is a way to avoid this in my theme, or a more proper way to remove content from a site … but I still don’t know which.
Where is the “Main” content area that should be there but isn’t?
What you are seeing in this screenshot are layouts, at some point you have used the Concrete layout tool and added a layout, a 3 column layout followed by a 2 column, and then another 3 column layout. Or they were there from when you had the previous theme installed.
Layouts will not be removed by installing a new theme, nor should they be, what if the end user wants them there? the only time they will be removed is if you install a theme with demo data and then it will implicitly tell the user their content is going to be overwritten.
Your concern about orphaned areas is not really an issue as layouts can be deleted.
I think you may benefit from downloading a free theme from the marketplace, Stucco would be a good choice as it has demo data and is cleary and cleanly coded, it will give you a good overview of how a theme is constructed.
Editable areas are really just foundations for an end-user to place their layout in, yes, you can make templates with various different editable areas, but ultimately the end-user will build layouts as and when they see fit.
Thanks @VidalThemes , I was not aware of the layout tool (so while I certainly never used it) that helps explain it.
I understand that themes shouldn’t overwrite layouts but … I’m the user here, and I don’t want them. How can I remove them?
More fundamentally, as user (not a designer), If I apply some package that sets up all these layouts … and then I change my mind. I go wild and delete my blocks and apply a new simple theme. How do I get rid of the old layout?
Also you said:
the only time they will be removed is if you install a theme with demo data and then it will implicitly tell the user their content is going to be overwritten.
Ok, how can I make my package do this and get rid of these things?