Greek Yogurt - Footer - help pls

Permalink
Hello,
I'm VERY new to websites - overall I have found C5 very good compared to other CMS's I've tried and found rather complex (ie _oolma gggrrr). BUT.... re the footer of the default/GY theme - I've tried and I've tried to edit it, I have first tried to copy from core file to a "my_theme" file and I'm just not getting it gggggrrrr - no doubt my own newbie fault, but it is driving me nuts - may be please a future version could just have an easily editable footer????

So, I'm thinking:
- I could buy "District" (trying not to spend any more ca$h on site work if possible)
- I could find a theme similar to GY - that my existing site would easily slip into, that has an editable footer???
- is there and idiot proof way to make my GY footer editable - ie plug-in etc?

Any thoughts appreciated and thanks in advance.

 
enlil replied on at Permalink Reply
enlil
I like to try to help you out. Can you be a bit more specific about what you want to change. Maybe some screenshots...
Robmr replied on at Permalink Reply
Thank you for your kind offer which is much appreciated - I've luckily made some progress - thank you again!
adajad replied on at Permalink Reply
adajad
Some of the information below might be old news to you, but please read it through and I think you will have an editable area in your footer in less time than it took me to write this down.

1. Copy the complete folder 'webroot/concrete/themes/greek_yogurt' to 'webroot/themes/greek_yogurt'.

2. Rename your newly copied 'webroot/themes/greek_yogurt' to something like 'webroot/themes/greek_yogurt_mod'.

3. Open 'webroot/themes/greek_yogurt_mod/description.txt' and change the content to something like the below (to distinguish it from the core theme):
Greek Yogurt Modified
Modified Greek Yogurt with editable footer.


4. Install and apply your new theme via the dashboard.

5. Open and edit the file 'webroot/themes/greek_yogurt_mod/elements/footer.php'. Now I don't know where you want the editable area or how it should be styled, but below is the 'magic' code that makes an editable area:
<?php 
  $a = new Area('Footer');
  $a->display($c);
?>


The above code will give you an area with content related to one page only (unless you add content via page defaults), and if you want a global area holding the same content throughout your site you should use this code instead:
<?php 
  $a = new GlobalArea('Footer');
  $a->display($c);
?>


To wrap the whole thing up you should place your editable area inside a div you can style with css:
<div id="footer">
  <?php 
    $a = new GlobalArea('Footer');
    $a->display($c);
  ?>
</div>


Once your changes have been done and saved, you should see the result on your site. If not, make sure you have cleared both site (search for 'clear cache' in dashboard intelligent search) and browser chache (ctrl + F5).

EDIT: Sloppy copy/paste included $c in display() for GlobalArea, which isn't recommended (but it still works). Letting the above code be for historical reasons, but you should check out the 'error' enlil points out below.
Robmr replied on at Permalink Reply
Thank you for your excellent advice - it has helped me progress matters. Thanks again.
Shine4897 replied on at Permalink Reply
Trying to do exactly what you described, but changes absolutely refuse to show up on the install page. What am I missing?
enlil replied on at Permalink Reply
enlil
Hi shine, can you give me some details as to what you have done and what you want to accomplish please?
enlil replied on at Permalink Reply
enlil
one error i see in the code above is this:

$a = new GlobalArea('Footer');
    $a->display($c);


use this for an "area"
$a->display($c);


use this for a "global area"
$a->display();
adajad replied on at Permalink Reply
adajad
Nice catch, enlil. Passing the current page to a GlobalArea isn't recommended, but it still works.

For what it's worth, use the code from enlil when defining a GlobalArea.