Create a "Add to Main" area after a left sidebar page

Permalink
Hi forum,

I am using the plain yoghurt default theme and would like to create a new full width area "same than header" right after the left sidebar page area.

Check the attacheed file if I do not explain myself clearly. The red rectangule highlights the area I'd like to create.

I have tried different ways to do this but none worked.

Please help!!!!

Thanks in advance

1 Attachment

ggutierrez79
 
s2d replied on at Permalink Reply
s2d
Here are a couple of links to useful info on creating your own edit zones:
http://www.concrete5.org/documentation/developers/pages/areas/...
http://www.concrete5.org/documentation/how-tos/editors/another-prim...

To be more specific, you can add as many edit zones to your templates as you like; they each have to have a unique name.

Typically, you would use a snippet like this:
<?php $a = new Area('<name_of_edit_zone>');
$a->display($c); ?>
ggutierrez79 replied on at Permalink Reply
ggutierrez79
Thanks Kate!
I am going to try this now, I'll let you know if I find any difficulty.
ggutierrez79 replied on at Permalink Reply 1 Attachment
ggutierrez79
Hi Kate,

I have added a new div to default.php (plain yoghurt theme)and the result is:
<div id="footer">
<?php $a = new Area('<main_extension>');
$a->display($c); ?>
</div>

Why id=footer? That's a temporary solution, because I have tried id=central with the following css:
#page#central.main_extension{ float: none !important; width: auto !important; }
and I get something unexpected (attached file).
I know it comes from the css and do not know how to name that area in order to be independent of the central and the footer areas.

Many thanks in advance!
s2d replied on at Permalink Reply
s2d
Oh - sorry, I should have mentioned that the "<...>" brackets are not intended to be included in your name string. That was just to show that it's something you should rename according to your needs.
ggutierrez79 replied on at Permalink Reply
ggutierrez79
Thanks!
I have deleted the brackets. However I still have the same issue. Any idea what I am doing wrong?
Thanks again!
s2d replied on at Permalink Reply
s2d
Well, for one thing, your css element does not define an id called "footer", it defines a class called "main_extension". Still, your edit area should be displayable; it just won't have the properties you are trying to give it. Other than that, once you remove the brackets, it looks like it should work.
ggutierrez79 replied on at Permalink Reply
ggutierrez79
Hi Kate,

Well I managed to create the new area and I managed to create a footer as well. However the footer only shows up in the home page, not in left_sidebar pages or right_sidebar pages. I have also added the new "footer" area in the default.php and left_sidebar.php.
Any idea? Should I paste some code, so as it could help you more to understand where the problem comes from?

Thanks in advance!
s2d replied on at Permalink Reply
s2d
You'll need to duplicate your changes to all the template files that you want to contain the new edit zone.
ggutierrez79 replied on at Permalink Reply
ggutierrez79
But I have already made the changes in the file left_sidebar.php and default.php pages. Which else would I have to change? I don't know whether I understand pretty well the difference between page and template.
http://www.concrete5.org/documentation/developers/pages/themes/...

Sorry for this! I am a new bee with c5 and despite of I try to get more familiar with it, there are still many points I have to learn how to deal with.

Thanks a lot for your help!
ConcreteOwl replied on at Permalink Reply
ConcreteOwl
Post the code for the default.php page