PHP Includes Support



I’m a new user of sitecake and I’m trying to integrate our template. Can anyone confirm whether PHP includes are supported? If not it means every single page in our site will have the header and footer duplicated within it, which is crazy.

Thanks in advance,


Not right now. We are releasing an update tomorrow that will support PHP includes. If you already purchased Sitecake you will get it as a free upgrade.


Great news!! Thanks for the update.



Looking forward to the update!



Any update on this release yet? If it’s unlikely to happen soon please let me know as we need to move our project along.



Last minute testing discovered some issues so we had to fix them before the release. Everything is okay now. Expect the update tomorrow. (now for real)


Hi Nik,

How’s it all going? Still ok for a release today?



We just did soft release, all previous buyers will receive email update in few minutes.




Thanks for the update. I’m working on upgrading to it now so I’ll report back if I find any issues.



Minor snag. I upgrade and got:

Fatal error: Root site directory have to be readable and writable. in /some/path/www/sitecake/2.3.1/config/check.php on line 22

The base directory was writable so I added the path as part of the output in /some/path/www/sitecake/2.3.1/config/check.php:

// Check if document directory is writable and readable
if(!is_writable('../') || !is_readable('../'))
    trigger_error("Root site directory have to be readable and writable. (".realpath('../').")", E_USER_ERROR);

This tells me it’s /some/path/. It’s the folder above my webroot (which is /some/path/www/) which doesn’t really present a problem in my dev, hence I’ll just 777 this folder to move on. It might be an issue when I come to go live though.


After navigating to sitecake.php I try to login and get “Error:”, with no error in the login box. Using firebug I can see the request has the following response:

Fatal error: Root site directory have to be readable and writable. (/some/path/www/sitecake/2.3.1) in /some/path/www/sitecake/2.3.1/config/check.php on line 22

So same check as above. I assume this file is included somewhere else which means the check on the relative path …/ is different. I’m commenting this out for now.



It seems to be working fine with php includes so thanks again for this. I should be able to use it for my clients website now.

1 question… what library are you using for the floating toolbar? i.e. can it easily be extended? I noticed you can edit external pages by doing sitecake.php?page=contact.html however there is no drop down list of available pages. I’m interested in building it in.



I’m planning on spending more time on this tomorrow but I just wanted to say well done on the script! There’s a few snags you could do with clearing but it’s got really good potential.

Last question, is it possible to use spans for the editable area? I tried adding:

<span class="sc-content">Some Editable Text</span>

and while it was replaced with the placeholder text in the source code, it wasn’t clickable or editable. It would be handy to have spans supported so text which doesn’t have a div around it can be included.

Thanks again!


Hi YetiShare, thanks for nice words :slight_smile: . We are trying to make sitecake better and better every day :slight_smile:

As for problem with permissions it will be fixed in next release that is coming out in next couple of days.

Sitecake editor is built in GWT and currently is not extendable. We are rewriting it in plain javascript currently and it will be extensible when we get it out. We are also building pagemanager module for current GWT version of editor that will be released with 2.4 version of Sitecake, but I’m still not sure when it will be out.



No worries, I know how much effort it is to write code (and how underappreciated it can be sometimes!) :smile:

I’ll have a look at the code to see if I can make the changes I want myself.

Thanks again!


At this moment it’s not possible to use spans. You can use p tag for this, but wrapped in div, of course.

<div class="sc-content"><p>Some text</p></div>

Actually sc-content can be applied to any tag, but to wrapper tag that wraps content tags (p, h1, img, …)

I suppose <span class="sc-content"><p>Some text </p></span> would work.
Also <article class="sc-content"><p>Some text </p></article>should work.