|
... the common left navigation....
<$ left_column $>
|
<$ title $>
<$ contents $>
Then an individual page (/www/html/somepage.ihtml) could be:
<% parent "/global.tmpl" %>
<% section title %>My Wonderful Title<% /section %>
<% section left_column %>
Crap crap crap that goes at the bottom of the left column
<% /section %>
<% section contents %>
The main contents of my page
<% /section %>
The real power of this is that files don't need (and won't want to) have
the global site template as their direct parent: you can have as many
levels of <% parent %>s as you want. The IHTML file fills gaps in its
immediate <% parent %>, which fills gaps in its own, and so on. This
lets you have a template for each part of your site, while sharing parts
across the whole site too.
In iAct terms, a <$ section_name $> command is a forward-insertion:
a gap in a more general template is filled with a value defined in a
more specific template (such as the user-requested IHTML file itself).
Sometimes you will want to do the opposite: define some content (or
design element) in a very general template (used by many individual
pages), and insert it in various places on pages. For this, you use
a backward-insertion. The definition is the same:
In a general template, sometmpl.tmpl:
<% section "button_arrow" %>
 |
<% /section %>
And then in an file that wants to include a button with an arrow, and
that has sometmpl.tmpl as one of its ancestors (or <% import %>ed from
one):
<@ button_arrow @>.
Note the <@ @> instead of the <$ $>; this is what tells iAct to look for
this section "backwards", towards the parents.
There are several other other commands, and many other features in iAct,
including support for multi-lingual content, conditional inclusion of
text, dynamic applications calling Perl code from IHTML and manipulating
IHTML sections from perl, theme support (alternate versions of the same
templates, offering the same features with different looks), etc.
See the html documentation for details (it is still being written at the
moment).
AUTHOR
iAct was written by Roger Espel Llima for iAgora LLC
(http://www.iagora.com; software@iagora.net).
CONTACT
There is a mailing list about iAct. To subscribe, send an empty email
to .
There is a companion mailing list about iA::CMS, the Content Management
System for iAct. To subscribe, send an empty email to
.
LICENSE
Copyright (C) 2000 iAgora, LLC .
This program is Free Software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version. See the files LICENSE and LICENSE.GPL for
more details.
Please read the copyright statement on each file of the iAct
distribution, as some of the files can be redistributed only under the
terms of the GNU General Public License, and others can be redistributed
under the GNU General Public License or the Artistic License, at your
choice.
|