Forums / Developer / header tags in tables : PB !!!

header tags in tables : PB !!!

Author Message

Anthony M.

Thursday 15 March 2007 3:12:05 am

Hi,

when i insert an header tag in my editor, i can see in my site the real header that i put in the admin...
but when i insert an header IN A TABLE, it is replaced by another header, WHY ?????

how can i fixe this problem ??

Here is my "header.tpl" file :

<a name="eztoc{$toc_anchor_name}" id="eztoc{$toc_anchor_name}"></a>
{switch name=sw match=$level}
{case match=1}
<h1{section show=ne($classification|trim,'')} class="{$classification|wash}"{/section}>{$content}</h1>
{/case}
{case match=2}
<h2{section show=ne($classification|trim,'')} class="{$classification|wash}"{/section}>{$content}</h2>
{/case}
{case match=3}
<h3{section show=ne($classification|trim,'')} class="{$classification|wash}"{/section}>{$content}</h3>
{/case}
{case match=4}
<h4{section show=ne($classification|trim,'')} class="{$classification|wash}"{/section}>{$content}</h4>
{/case}
{case match=5}
<h5{section show=ne($classification|trim,'')} class="{$classification|wash}"{/section}>{$content}</h5>
{/case}
{case match=6} {* html does not have h7 *}
<h6{section show=ne($classification|trim,'')} class="{$classification|wash}"{/section}>{$content}</h6>
{/case}
{case}
<h1{section show=ne($classification|trim,'')} class="{$classification|wash}"{/section}>{$content}</h1>
{/case}
{/switch}

Thanks a lot

Anthony

Steffen Schlönvoigt

Wednesday 30 May 2007 5:01:35 am

Hi,

it seems that eZ changed the way it's declaring headers in 3.9 series. It doesn't have anything to do with your template file.
The problem resists in the xmlinput/outputparsers.
Headers don't get the level attribute assigned in the stored xml any longer.
The level is calculated by the depth of the section it is in. If there is a header before your table, then the level of headers inside your table is derived from this outer header.
I'm sure that doesn't make much sense and believe its a bug.

So, I'm sorry but there seems to be no solution to this right now besides hacking the kernel.

I hope I could help you with your confusion.

Steffen