[ic] Templating in 5.3.1

Kevin Walsh kevin at cursor.biz
Mon Oct 17 15:43:47 EDT 2005


Andreas Grau [agrau at esquat.com] wrote:
> The variable reference @_LEFTRIGHT_TOP_@ and @_LEFTRIGHT_BOTTOM_@ in
> pages/index.html is a leftover (which could be used by defining them in
> variables/) and is not used. Right ?
> 
Those are used, and are the most important parts.  See the
LEFTRIGHT_TOP and LEFTRIGHT_BOTTOM files in your "templates/regions"
directory.  The variables are picked up from that directory because
of the "DirConfig Variable templates/regions" directive in your
"catalog.cfg" file.

The LEFTRIGHT_TOP file/variable defines a bunch of named [output] areas.
The LEFTRIGHT_BOTTOM file/variable also defines a couple of named
[output] areas but, more importantly, handles the actual output of
these areas.

The LEFTRIGHT_BOTTOM calls [unpack], which uses a file in your
"include/layout" directory to control the page layout.  The
layout file uses placeholders, such as {{COPYRIGHT}} which, in
that case, refers to the named [output name=copyright] output area.

Output areas can be made conditional using the following syntax:

    {{FOOBAR?}}
        Some text here, if you want.
        {{FOOBAR}}
        More text here.  Optional.        
    {{/FOOBAR}

The above region would only be shown if the "foobar" output area
is not blank.

> 
> Below are a couple of [component group=vertical output="[control output
> left]"] (which are referred to as 'Slots') in the admin - what do they do
> ? 
>
Note the [component] tag's output="foo" parameter.  This forces the
component's HTML into a named output area, for later use by [unpack],
as described above.

> 
> {{:DEFAULT}} is the content from pages/index.html ?
> Where do {{Top}} and {{BOTTOM}} come from ?
>
The "{{:DEFAULT}}" area is used if no output area name is currently
defined.  Note the [output name=""] at the end of the LEFTRIGHT_TOP
file.

I hope this fills in some gaps.  Someone will correct me if any of
the above is inaccurate or incomplete.

-- 
   _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
  _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
 _/ _/    _/          _/ _/     _/    _/  _/_/    kevin at cursor.biz
_/   _/  _/_/_/_/      _/    _/_/_/  _/    _/



More information about the interchange-users mailing list