This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit ezplatform.com

eZ Community » Forums » Extensions » ezoe ezxml header-tag vs....
expandshrink

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

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

Wednesday 25 August 2010 8:34:11 pm - 6 replies

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

Wednesday 25 August 2010 8:40:39 pm

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

Thursday 26 August 2010 12:44:38 am

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

Modified on Thursday 26 August 2010 12:53:40 am by *- pike

Thursday 26 August 2010 9: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." blunk.gif Emoticon Always makes me smile when i see this in ez kernel classes.

Friday 27 August 2010 12:19:29 am

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/

Friday 27 August 2010 9: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.

Sunday 29 August 2010 12:56:14 am

> 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)

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from