[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]
Re: understanding swpage.wml
- From: Denis Barbier <nospam@thanx>
- Date: Tue, 22 Feb 2000 10:21:21 +0100 (CET)
On Mon, 21 Feb 2000, Jeff McCarrell wrote:
> Hi. I am trying to understand how best to use wml, and I have been
> examining swpage.wml. I have a couple of questions:
Hi Jeff,
> What is the top level command that builds all of the pages? I assume that
> it is some wmk command, perhaps from a Makefile of some sort?
Just ``wmk -a''
> In this fragment:
>
> 74 <ifeq "$(areaparent)" ""
> 75 <if <match "<get-var WML_SRC_FILENAME>" "index\\..*">
> 76 <set-var areaparent="../">
> 77 <set-var areaparent="">
> 78 >
> 79 <set-var areaparent="$(areaparent)">
> 80 >
>
> what is the motive for doing this? I mean, I understand what the code is
> doing, but why do you want the parent directory when the source filename
> starts with index. ?
Hmmm, areaparent is never defined in input files, so these lines should
be removed.
> This code:
>
> 130 ..!PAGE_TITLE!>>
> 131 Unknown Page
> 132 <<..
>
> sets up a default for the PAGE_TITLE named diversion. Why is this a good
> thing to do? It seems to me that there are a number of other (simpler)
> ways of defining default values for things. Why is the method of
> using a default diversion used here?
The page title is used at the beginning of the page (e.g. in META tags).
If you do not use diversions, your wml file looks like
<set-var title="Title of this page">
#include 'templates'
or
#include 'templates' title="Title of this page"
With diversions, you can define the title everywhere, for instance
#include 'templates'
<page-title "Title of this page">
> As an observation, the thing about wml that is giving me the most difficulty
> is trying to understand how to put the whole thing together in a sensible way.
> Publishing swpage.wml has been very helpful for me, to see the whole thing
> working together.
>
> A tarball of the site that I could modify and run the passes of
> individually to examine the intermediate output would help too. Is
> that available somewhere?
No, but this is a good idea. I'll try to find time to provide this
tarball.
> The other meta level question I have is how actively is wml being
> used? I know that is a subjective question, but if you have an
> opinion, I'd like to hear it.
Have a look at http://www.engelschall.com/sw/wml/example/refs.phtml
--
Denis Barbier
WML Maintainer
______________________________________________________________________
Website META Language (WML) www.engelschall.com/sw/wml/
Official Support Mailing List sw-wml@engelschall.com
Automated List Manager majordomo@engelschall.com