WebLord Extras: The New and the Old Explained (finally!)
Logo WebLord v2.2
The Document Assembly Tool

WebLord Extras

A number of .wl files ship with WebLord, which can be included in any site description file with an #include meta command. This section explains what they are:

	19134   Sep  9 23:06   colors.wl
	 5431   Sep  5 10:17   html-image.wl
	 5117   Sep  5 10:17   html-mozilla-page.wl
	 9431   Sep  5 10:17   html-page.wl
	   91   Sep  5 10:17   html.wl
	 1757   Sep  5 10:17   tools.wl
	 3303   Sep  5 10:17   tutorial.wl

colors.wl

Defines an object named color containing a large(!) number of properties with the names of colors. These colors are commonly referenced on Unix systems in a standard color file (rgb.txt) for various purposes and for this reason represent a fairly standard set of color names.

You can use these colors quite simply: color.DarkSlateGrey produces a value of #2f4f4f, and color.SpringGreen3 produces a value of #00cd66.

html.wl

A convenient file that references several HTML-related files:

html-page.wl

A "standard" template for an HTML header and footer, i.e. the <!DOCTYPE> header, the <HEAD> section with various <META> elements, as well as the page <TITLE>, and the <BODY> element with various attributes.

Your pages should define some or all of the following properties, but even if they don't the header and footer references from the html-page.wl file will help you build more correctly structured HTML pages:

bgimage the URL of a background image for the page
bgcolor the color of the page background (can combine with bgimage)
textcolor the color of the text, interacts with bgcolor/bgimage!
linkcolor the color of (new) links on the page
vlinkcolor the color of (old, visited) links on the page
alinkcolor the color of (active) links on the page (clicked but not released)
body-other other attribute/values for the body, verbatim(!)
author the name of the author of the page
description the description for the page, be really specific and word it carefully!
keywords keywords and phrases for the page, comma-separated; NO fluff!!
title the page title
html-charset defaults to 'ISO-8859-1' (ISO-Latin-1)
html-language defaults to 'en' (english)
html-direction defaults to nothing but left/right are the options
html-version defaults to '3.2' but you may set it to '4.0' to signify that you've made your page HTML 4.0 compliant
stylesheet URL for the page stylesheet
index URL for the index to a group of pages of which this one is a part
contents URL for the table of contents of pages of which this one is a part
begin URL for the starting (first) page of this group of pages
prev URL for the page preceding the current one
next URL for the page succeeding the current one

In case you're wondering: the funky names with ^ and _ symbols and such, are simply a perverse attempt to keep the names distinct from anything you are likely to come up with yourself. There is nothing special about these symbols, although you should be careful of special symbols: the & symbol has special meaning...

Also defined in this file is the format of HTML anchors that are used to construct hyper-links to resources given by the link property of a Text Object. By redefining these in your own way you can control how other languages might construct hyperlinks.

html-image.wl

This file is automatically included whenever you reference the old and deprecated IMAGE objects from the time of the initial release of WebLord. If you know not what this means, you probably don't have to concern yourself with the implications of this.

The html-image template object that is made available by including this file allows you to specify a text object's value = html-image; and then specify various additional properties. Inherited properties apply, of course, and the 'html-image' object will build you a valid <IMG> object:

image-src The URL of the image to show
image-losrc The URL of a rough approximation of the image that loads much quicker
image-width The width of the image in pixels (or percentage of display width, ex: '50%')
image-height The height of the image in pixels (or percentage of display height, ex: '25%')
image-align Alignment of the image relative to the text's baseline (top, middle, bottom) or the margin (left, center1, right)
image-border Number of pixels of border to surround an image if it acts as a link; WebLord omits the border reference if the image does not define a LINK attribute
image-hspace Horizontal space to separate image from neighboring elements
image-vspace Vertical space to separate image from neighboring elements
image-alt Alternate text to describe image purpose: valuable for text-only browsers or browsers that display this text before images are loaded (if at all)
image-target A window identifier where a new resource is displayed if this image is an anchor/link to it; choices are _self, _top, _blank
link This actually is just a standard Text Object property.

1 Images defined with a 'center' alignment are centered by enclosing them in a <DIV ALIGN=CENTER>...</DIV> construct, as HTML actually does not define a CENTER keyword for the <IMG> ALIGN attribute!

tools.wl

A useful collection of "tools", primarily to demonstrate how to construct dates in various formats, call external programs to delete a file, generate a unique filename, etc.

html-mozilla-page.wl

A demonstration of a relatively complex page layout with regions that feature round corners, etc. This page was modeled after www.Mozilla.org, so you can now build your own pages to look like that cool Mozilla.org front page merely by providing a few page properties to go on the page.

This page template is included primarily because it demonstrates how you could maintain the same names for page components, then swap out the page template out from under your pages and achieve different looks and layouts merely with the change of a template reference.


This material is Copyright © 1997,1998,1999,2000,2001 RingLord Technologies and Udo Schuermann. All rights reserved. The latest versions of the WebLord software and (this) documentation can be obtained from the WebLord Home Page (the link will only function if you are connected to the internet.)