Home_Page sep Recent_Changes sep Feed_back sep Online_Help sep Search:
This is the only way it can live. (in online_help)
active_content  right Referencing_Pages, Similar_Pages, Page_Activity
Chiq_Chaq – your friendly free_site
(with full online_help)

New Pages:


Popular Pages:

  1. Recent_Changes
  2. New=
  3. Referencing_Pages
  4. Home_Page
  5. Add_Messages


Random Pages:


Search this site:


You can edit this side_bar!

Chiq_Chaq pages can include parts from external sources: files, other pages, or scripts. These parts can add special active content to the page – like specialized HTML segments or live script results – that is automatically updated when the external source changes.

To include active content in a page, Chiq_Chaq uses the notation:
[<-include-as-is]

or:

[->include-and-process]

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.

Types of Active Content

Files
To include a file, put in the directory $include_dir (by default it is the 'include' sub-directory of the chiq_chaq directory). Then you can include its contents in a page using, for example:

[<-cool.html]

To include a file from a different directory, prepend the directory variable name and a colon to the file name. For example:

[<-skin_dir:cool.html]

You can see a working example of this in the page bug_report, which includes the file $skin_dir/bug.html.

Pages
To include a page, use:

[->Page_Name]


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.

Variables
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

Scripts
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:

Back to the Admin_Manual
Created using Chiq_Chaq sep Terms_of_Use sep User_Privacy