Hi all,
Just a general query, not urgent.
I've been using HTML5 tags and cmsms seems to break when dealing with the <header> tag.
By break, I mean it won't render anything after the line the tag is inserted.
I'm using the latest cmsms core, 1.9.3 and it was a fresh install.
Has anyone else experienced this? I couldn't find many posts about it on the forum (in fact only this one http://forum.cmsmadesimple.org/viewtopic.php?t=46994)
But it didn't really help except confirm the cms doesn't like it.
I tried a few workarounds but couldn't seem to fix it.
Just thought I'd bring it up.
Thanks,
M
HTML5 Header Tag Breaks Layout / Page [SOLVED]
HTML5 Header Tag Breaks Layout / Page [SOLVED]
Last edited by myshko on Wed Mar 02, 2011 12:41 am, edited 1 time in total.
Re: HTML5 Header Tag Breaks Layout / Page
Try changing 'process_whole_template' in your config.php from 'false' to 'true'
The default value (false) tells CMSMS to process the </__body> before the <head>.. The code is searching for '<head.*>'.. <header> matches this pattern as well and might be the reason for your issues.
This feature, (false) is so you can generate smarty variables in your content and use them later in the <head>. The most common use for this is for using the news title to be your <title>. You will lose this functionality by setting it to true.. It will read the entire thing at once.
Code: Select all
$config['process_whole_template'] = true;
This feature, (false) is so you can generate smarty variables in your content and use them later in the <head>. The most common use for this is for using the news title to be your <title>. You will lose this functionality by setting it to true.. It will read the entire thing at once.
Re: HTML5 Header Tag Breaks Layout / Page [SOLVED]
Wishbone,
Thank you very kindly sir!
Yes, setting 'process_whole_template' in the config to 'true' solved the issue.
Greatly appreciated, and such a quick response too.
Also, just in case anyone else is playing with HTML5 tags and has a similar issue, you can just switch them to divs with a class, and change your css.
So,
Would become,
And you can just change your styles to suit. You can still use the shortened doctype / charset too.
Regards and best,
M
Thank you very kindly sir!
Yes, setting 'process_whole_template' in the config to 'true' solved the issue.
Greatly appreciated, and such a quick response too.
Also, just in case anyone else is playing with HTML5 tags and has a similar issue, you can just switch them to divs with a class, and change your css.
So,
Code: Select all
<header>
<hgroup>
<h1> Main Heading</h1>
<h2>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</h2>
</hgroup>
</header>
Code: Select all
<div class="header">
<div class="hgroup">
<h1> Main Heading</h1>
<h2>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</h2>
</div>
</div>
Regards and best,
M