Jump to content

[Solved]cms block lacks heading


cassandra8

Recommended Posts

I have a small problem I just can't seem to understand how to fix. In the w3 validation of my site it says that I have a warning which say's "Section lacks heading. Consider using h2-h6 elements to add identifying headings to all sections." This is coming from the left cms block and is under the section not the cms page... this has the headings. Am I missing something on how to fix? I tried deleting and adding another and it did it again.

Edited by cassandra8 (see edit history)
Link to comment
Share on other sites

Looking at lines 30-34 of themes/default-bootstrap/modules/blockcms/blockcms.tpl on my PrestaShop v1.6.1.5 test site, it would appear the CMS block is using a <p> for the heading instead of a header element:

			<p class="title_block">
				<a href="{$cms_title.category_link|escape:'html':'UTF-8'}">
					{if !empty($cms_title.name)}{$cms_title.name}{else}{$cms_title.category_name}{/if}
				</a>
			</p>

It would appear the validator wants you to change the <p> and </p> to header tags. You can try doing that and seeing if it messes up the CSS.

Link to comment
Share on other sites

It is better to go to the Advanced Parameters > Performance tab and then click the "Clear cache" button at the top instead of manually editing files in the cache directory. ;)

 

If your issue is resolved now, please edit your first post and add [sOLVED] to the front of the title.

Link to comment
Share on other sites

You need to change the original file themes/default-bootstrap/modules/blockcms/blockcms.tpl. Change default-bootstrap to the directory of your theme if you're not using the default theme. If you only change the file inside the Smarty cache, it will be overwritten every time your website changes.

 

If that file doesn't exist inside your theme, you'll need to copy modules/blockcms/blockcms.tpl inside your theme and then change it.

Link to comment
Share on other sites

I have that module inside my theme  however this is what is there. 

<h4 class="title_block">
<a href="{$cms_title.category_link|escape:'html'}">{if !empty($cms_title.name)}{$cms_title.name}{else}{$cms_title.category_name}{/if}</a>
</h4>
 
As you see the h4 heading is there and not changing. I  only see the <p> heading in the cache and this is the only thing that will get rid of the error. I tried changing the h4 to h2 but it went back to the h4.
Scratching my head.. Any other place it might be that would work to change?

by the way... thanks for all you help so far. It has got me a little further in finding this.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...