Adding blocks doesn't work as expected

Permalink
Dear Devs and Users

I just wanted to dive into learning concrete5 and followed the "Converting an HTML Template to a conc5 Theme" Tutorial by concrete5 on youtube. First of all: I have to say, this is awesomely simple and I like this very much especially for the purpose I'd like to use it for!!

I'm a seasoned php programmer and followed all instructions to the end. I'm using v8.4.3 (latest) and I'm having some very weird behavior.

- Adding a content block to a defined area doesn't work as I have no save button. I tried a lot but it just doesn't work.
- Adding an HTML block leads after clicking on "Add" to an empty page displaying the contents of an array (that's how it looks like, similar to a print_r but only the contents and a little different structured). BUT: when I use the back button I actually have the content inside the area, so it works, but not quite a nice behavior.
- Haven't tested any other content blocks yet as not yet needed.

my "area" implementation in my full.php:
<h1><?php
$title = new Area('Title');
$title->display($c);
?></h1>
<h2><?php
$subtitle = new Area('Sub-Title');
$subtitle->display($c);
?></h2>

As you can see I actually like the h1/h2 tags outside the area because I don't want the end user to be able to change these! So to get him insert text only, I thought about using the HTML block. But it's not working that great as you can see above.

Is this a common bug, or did I do something wrong? :)

Thank you very much for your help!
All the best,
Oli

 
JohntheFish replied on at Permalink Reply
JohntheFish
There are lots of intricacies in the way the theme calls the c5 header and footer and a simple mistake can lead to an inoperable theme.

The simplest way to start learning about themes is to use Cloneamental or Elemental Cloner to create a starting point. If your theme is bootstrap, its then usually trivial to replace the Elemental specific css and layout with your own.
http://www.concrete5.org/marketplace/addons/elemental-cloner...
https://www.concrete5.org/marketplace/themes/cloneamental...

This has the advantage of starting from a point you know is compatible with your core version (videos are good for general principles, but they also age)

If you are developing a non-bootstrap theme, I would still recommend the above as a learning device and even as a starting point, though there would be a lot more to undo.
onchones replied on at Permalink Reply
You might want to try a clean install and convert the theme again. I followed the documentation here (which should be the same as what you followed) and it works perfectly:https://documentation.concrete5.org/developers/designing-for-concret...

You should definitely be able to add and save content and HTML blocks without a problem. Something must have gone wrong, but not sure without being able to see the source code.