To include active content in a page, Chiq_Chaq uses the notation:
In the first case, chiq_chaq will copy the included content into the page as-is. This is good for HTML segments.
In the second case, chiq_chaq will process the included content like it processes all text in a page, converting links and changing format marks to HTML tags. This is good for text segments.
To include a file from a different directory, prepend the directory variable name and a colon to the file name. For example:
You can see a working example of this in the page bug_report, which includes the file $skin_dir/bug.html.
To include a page, use:
If the page has an opening section, only the opening section will be included, and the following sections will not be shown.
You can see an example of this in the configuration variable $left_bar which includes the page Side_Bar.
There are several variables that can be evaluated in active content, using the notation [->$variable]
Available variables are:
$title – name of the current page
$author – pen-name used by the user.
$referer – title or URL of the page from which the user reached the current page
$group – current group ('chiq' by default)
$logo_title – name of the page linked from the logo
$script_name – relative path of chiq.pl
$script_host – host's domain name
$graphics_dir – relative HTTP path to the directory for images and CSS files
Perl scripts can be included only if they are in $include_dir. To include a script, its name should be followed by a question mark, and optional parameters. For example:
[<-active.pl?some parameters in any format]
You can see a working example of this in the page Similar_Pages, which includes the script like.pl.
The script parameters may include variables from the list in the previous section.
Details for programmers of included scripts: