Better generated layout

Marjolein Katsma <[email protected]> Fri, 1 Aug 2003 15:10:37 +0000 (UTC)
Newsgroups gmane.comp.cms.xaraya.documentation
Organization Xaraya News Server
Message-ID <[email protected]>
TIP:

Have you also noticed that HTML generated by BL often contains a lot of 
extra spaces and tabs which make the source hard to read?

There's a very simple remedy.

A BL template is a mixture of TWO languages. Most BL templates I've seen 
so far, indent the BL tags along with the HTML tags - and that causes it: 
an indented BL tag is actually a number of spaces/tags _followed_by_ a BL 
tag: and that indenting whitespace ends up in the generated code.

The trick with two-languages-mixture templates (and I've worked with such 
templates in many languages) usually is to have each language maintain its 
*own* indenting levels. I've found this works quite well with Xaraya BL. 
This doesn't necessarily make the templates harder to read (on the 
contrary!) - but an editor with good color-coding facilities will help to 
keep BL and HTML separate. (I'm using HomeSite 5.)

Here's a little screenshot to illustrate the principle:
http://www.xs4all.nl/~iamback/tests/xaraya1.png

-- 
Marjolein Katsma
* Help with HomeSite/Studio: http://hshelp.com/
* Books for webmasters and webrookies: http://books.hshelp.com/
* Java Woman: http://javawoman.com/