How can I overwrite the Loader::element('header_required') - Adding HTML5 support
Permalink
Hi,
I want to use HTML5 Doctype and I want it to validate, currently this is not possible with C5. C5 doesn't take care about the doctype, so if you use HTML5 Doctype it still echos:
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
HTML5 doesn't require http-equiv and content, only charset. Of course, I could change it directly in code, but I think (I really hope) that there is some suport for voerwriting or injecting logic into the C5 core.
If so, please tell me what I have to use. (Not the code, just if a helper/tool or whatever would do it)
Also I think of rewriting the editor to be inline and to get ride of that typography.css. So how can I overwrite such things and provide them as an addon to the community?
Thanks
I want to use HTML5 Doctype and I want it to validate, currently this is not possible with C5. C5 doesn't take care about the doctype, so if you use HTML5 Doctype it still echos:
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
HTML5 doesn't require http-equiv and content, only charset. Of course, I could change it directly in code, but I think (I really hope) that there is some suport for voerwriting or injecting logic into the C5 core.
If so, please tell me what I have to use. (Not the code, just if a helper/tool or whatever would do it)
Also I think of rewriting the editor to be inline and to get ride of that typography.css. So how can I overwrite such things and provide them as an addon to the community?
Thanks
It looks like you might have your 'Overrides' cache turned on in the Dashboard->System and Settings->Cache and Speed Settings. When you're building a site, make sure ALL the caching is turned off including the cache in your browser(s).
I have never had issues clearing the cache from the Dashboard. What is telling you that the cache isn't being cleared? Are you receiving an error message or is it that you still see stuff in the files/cache folder after you officially 'clear the cache'. If it's the latter, don't worry about that because thumbnail images are kept in there even after clearing the cache.
I have never had issues clearing the cache from the Dashboard. What is telling you that the cache isn't being cleared? Are you receiving an error message or is it that you still see stuff in the files/cache folder after you officially 'clear the cache'. If it's the latter, don't worry about that because thumbnail images are kept in there even after clearing the cache.
PHP-Errors not C5 errors. It's not a bug, didn't surprise me to get an error.
The docs says it should wokr if I copy header_required.php to the root/elements folder but this does not work. Why? And whree in code is this mechanism coded, I can't find such a mechanism.
thanks
Edit: I solved my problem. The problem is, that elements get cached. Somehow I couldn't find anything in the docs. If this isn't menitoned there please add it!
Also if you created a element in the root/elements folder and then delete it it was cached so you will receive errors!! You can't delete the cache via teh dashboard anymore.
To remove the cache do: rm -rf /path/to/your/site/files/cache/*