ezoe ezxml header-tag vs. html-header-tag level

Author Message

Christian Rößler

Wednesday 25 August 2010 11:34:11 am

Hy,

just fell across the following issue and would like to know the technical reasons for this design decision:

http://share.ez.no/articles/ez-publish/how-to-skin-an-ez-publish-now-site/(page)/9

"h1 in XML in the Online Editor is equivalent to h2 in XHTML; h2 in XML in the Online Editor is equivalent to h3 and so on."

I know it's not a bug, it is a feature. But I would like to know WHY (technically speaking) a ezxml header-tag level 2 is translated to an (x)html header tag level 3.

Thank you.
Chris

Hannover, Germany
eZ-Certified http://auth.ez.no/certification/verify/395613

Christian Rößler

Wednesday 25 August 2010 11:40:39 am

oopsy, tried the search function which gave me the following result:

http://share.ez.no/forums/developer/contributed_documentation_problem/(from)/ez.no/

So it's a xhtml standard, thus i cannot 'skip' header levels and must maintain the order h1, then h2 after that h3 and so on. I cannot start with h3 in my document.

m(

thanks
chris

Hannover, Germany
eZ-Certified http://auth.ez.no/certification/verify/395613

*- pike

Wednesday 25 August 2010 3:44:38 pm

I think the standard is the h1 is more *important* than h2, but not necessarily the first .. or ..

http://www.w3.org/TR/xhtml2/mod-structural.html#sec_8.5.

doh .. "The practice of skipping header levels is considered to be bad practice. The series h1 h2 h1 is acceptable, while h1 h3 h1 is not, since the heading level h2 has been skipped."

...that still doesnt explain why <header level="1"> becomes <h2>. very confusing indeed. I think in most designs h1 would be reserved for the title of the page .. so the content of the xmlblock should indeed often be lower. still, if that was the choice, they should have limited it to 5 headers by default. you can change all that ofcourse.

*-pike

---------------
The class eZContentObjectTreeNode does.

Christian Rößler

Thursday 26 August 2010 12:44:02 am

Thanks for your input and comments pike.
Your link to w3c.org helps me to understand this issue (and thinking) more.

Nevertheless, it still does'nt explain the whole translation process. I'll dig through some ini-files and/or ezoe-classes to find a nice way to alter this behaviour to our (clients) needs.

Thanks again.

Chris.

Ps: i like your signature: "The class eZContentObjectTreeNode does." ;-) Always makes me smile when i see this in ez kernel classes.

Hannover, Germany
eZ-Certified http://auth.ez.no/certification/verify/395613

André R.

Thursday 26 August 2010 3:19:29 pm

you can opt out of the h1 becomes h2 stuff by overriding header.tpl, original is in:

http://github.com/ezsystems/ezpublish/tree/master/design/standard/templates/content/datatype/view/ezxmltags/

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Christian Rößler

Friday 27 August 2010 12:23:45 am

yep, found it already.
thanks andré.

btw: git/github rocks. subscribed to its rss feed to get the bleeding edge commits...
great decision for the switch to git.

Hannover, Germany
eZ-Certified http://auth.ez.no/certification/verify/395613

André R.

Saturday 28 August 2010 3:56:14 pm

> btw: git/github rocks

Oh yes! In the prosess of creating a git guid for getting source and contributing easily with Github GIt style. So much easier to do for reviews, testing & sharing new stuff, and suggest changes..

fork -> change -> push topic branch -> request pull

(iterate change and push until you / ez / others are happy with the change using online review and diffs)

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.