
|
|
|
Pagenews website
|
|
|
|
|
|
|
|
|
|
|
|
Pagenews website
Copyright (C) 2004,2005,2006
by Philipp Kindt
|
|
Create-on-the-fly
Content
General
How it works
COF - Filenames
Volatile documents
General
This document is about the create-on-the-fly - capabilitys of Pagenews. Pagenews usually displays your templates
(files in cgi-bin/restricted/templates/user/{NAME}.dontemplate when you call news.cgi?do={NAME} in your browser,
where {NAME} should be replaced by the template you wish to show. Please refer to the template hierarchy document to get to know more about this.
Websites such as this are generated dynamically each time you call them.
But some search engines prefer static documents to list them, and if you have many visitors, it causes a lot of CPU load. So static documents are quite useful and fancy!
How it works
Pagenews contains the create-on-the-fly (COF)-System that builds static HTML-files from your templates.
The parser begins parsing the Standard template and looks for links on news.cgi. Therefore, some conventions in your HTML-page must be fulfilled:
Arguments must be written with quotes! For example,
<a href = "news.cgi?do=mytemplate">This is a link</a>
is valid, but
<a href = news.cgi?do=mytemplate>This is a link</a>
is invlid! The parser follows all hyperlinks and writes them as static HTML-files. Paths (for images,etc.) are replaced automatically.
COF - Filenames
If you switch on create-on-the-fly (COF) in the settings menu, everytime you edit a template, make a posting, etc.,
your templates are made static by building HTML-files. The directory they're written to can be specified in the settings menu, it is
the directory below cgi-bin by default. The filenames are choosen automatically by the system. The template "Standard" called without any browser params
will be used to write an index.html. All other filenames begin with a prefix you can choose in the settings menu, contain the tempate name and a number.
You can set a special filename to a template by simply adding a query-string key having the name "donparser_COF_filename" and the static filename
you wish as the value to the link on the template, for example
<a href = "news.cgi?do=RSS&feed=Standard feed&main_template=donparser_no_main_template&donparser_COF_filename=RSS_Standard feed.rss">
would cause the parser to create a file named "RSS_Standard feed.rss" from template "RSS"
Volatile documents
If you have a document, that contains data that is volatile, you must prevent the parser from making it static.
Data is volatile, if it does not only depend on the query-string! In this case, simply add this code to the document:
[OPTION volatile yes]
If a template contains this, the template (and all templates that use it) will be kept dynamic!
|
->
admin log-in
Powered by Pagenews DN 6.1.2 by Philipp Kindt
|