The page div - why?


leif halvard silli
 

According to the Xway manual, pages need a

<div id="pagediv1">

as its root element. You say even that the type of the page div, cannot be changed

But why? What issues do you solve by that?

Why not instead require a special id or class for the body element? For example:

<body id="pageroot-1">

May be you have good reasons for your choice. But let me explain what I think the  idea to use the body element would solve:

1) Web designers know that the type of the body element cannot be changed

2) they also considers it the root - thus the do not need to learn that Xway considers something else the root.

3) It would be simpler to remake existing templates in Xway  E.g  if one wants to remake a page or template in Xway and if that page/tenplate itself contains a page div (such as <div class="content" ), it seems the current approach would result in two page divs - that if Xway and that of the template. And if the imported code contains no page div, it would be impossible to remake the page/template in Xway unless you rethink the entire template.

Leif Halvard Silli


leif halvard silli
 

According to the Xway manual, pages need a

<div id="pagediv1">

as its root element. You say even that the type of the page div, cannot be changed

But why? What issues do you solve by that?

Why not instead require a special id or class for the body element? For example:

<body id="pageroot-1">

May be you have good reasons for your choice. But let me explain what I think the  idea to use the body element would solve:

1) Web designers know that the type of the body element cannot be changed

2) they also considers it the root - thus the do not need to learn that Xway considers something else the root.

3) It would be simpler to remake existing templates in Xway  E.g  if one wants to remake a page or template in Xway and if that page/tenplate itself contains a page div (such as <div class="content" ), it seems the current approach would result in two page divs - that if Xway and that of the template. And if the imported code contains no page div, it would be impossible to remake the page/template in Xway unless you rethink the entire template.

Leif Halvard Silli


Jeremy Hughes
 

Hi Leif,

We considered not having a pagediv, but we felt that it made things simpler. When you say “web designers know...”, you’re really talking about hand-coders. Xway (like Freeway) is aimed at people who don’t necessarily want to write code by hand.

One thing that it simplifies is that it’s easy to generate pages that are centre-aligned by default.

1) Web designers know that the type of the body element cannot be changed
That’s also true in Xway.

2) they also considers it the root - thus the do not need to learn that Xway considers something else the root.

Xway doesn’t consider the pagediv to be the root. Xway considers the page to be the root: head and body are children of the page, and the pagediv is a child of the body.

3) It would be simpler to remake existing templates in Xway
We haven’t got to the stage where we’re writing code for HTML import or Freeway import, but I don’t think the existence of a pagediv will make it more difficult - 1. Freeway has a pagediv, 2. We can easily make allowances for code that doesn’t have a (single) pagediv.

We’re not locked into this. If we decide in future that the pagediv should be optional, we can do that. But there are other things that are more important at the moment.

Jeremy