On Jun 12, 2008, at 11:26 AM, Jean-Vincent Drean wrote:
On Wed, Jun 11, 2008 at 1:37 PM, Ari
<ari(a)dicode.fi> wrote:
> Hello. My question / suggestion goes with two part.
>
> PART 1
>
> I've tried to figure out why the XWiki renders xwiki-headings as it
> does. E.g "1 Title One" is rendered as '<h2
class="heading-1">Title
> One</h2>'. I would like to change this to be h1-element instead of
> h2-element.
>
> At first I suspected that this change would require only small
> modification in some velocity template. It seems that I was wrong. My
> current guess is that this rendering is done somewhere in java (from
> xwiki.hbm.xml I tracked the doc.XWikiDocument and with that my
> guess is
> DefaultXWikiRenderingEngine.java). However, I don't know how/where I
> should change the code.
>
> Is there a flow-chart or something to describe the render-phase?
No, not yet. We'd like one. I'll do one for the new rendering. In the
meantime it's described here:
http://dev.xwiki.org/xwiki/bin/view/Design/NewRenderingArchitecture
As the
description of this list goes: I would suggest that the xwiki
rendering should be done in a straightforward way where syntax 1
would
be h1, 1.1 h2, 1.1.1 h3 and so on.
Yes the semantics of our titles aren't correct, if I remember well
those titles are the default titles coming from Radeox (the rendering
components we use which is not part of the XWiki project itself).
BTW we are currently rewriting the whole rendering component so I
think this issue will disappear in a near future, Vincent can you
confirm ?
Well it's our own decision to decide if 1 should generate h1 or h2. I
agree it probably makes sense to generate h1.
The new code is here:
http://svn.xwiki.org/svnroot/xwiki/xwiki-platform/core/trunk/xwiki-renderin…
You'll see that right now I've mimicked the old behavior of putting h2
for title level 1.
The problem is that if we change it then we also need to change the
old code since we need to modify our CSS files too.
Honestly I think this a nice to have but still a very low priority
compared to other issues we have to fix in jira.
So if a contributor gives us a clean patch we'll apply it but
otherwise I'd suggest we don't spend too much time on this.
Thanks
-Vincent