![]() |
| > Home > Documentation > Latest documentation > Local config directives > PageTables |
|
PageTablesSpecify one or more tables to look into for pages before looking at the filesystem. Synopsis
The parameter(s) are expected to be valid table names. ScopeThis directive is only available for use in the local (catalog.cfg) configuration file. It will not affect any other website in any way. This directive will not work in the global (interchange.cfg) configuration file. DescriptionThis directive allows you to set up your website to serve pages from a list of database tables. The database table(s) will be consulted, in turn, to find the page data. If the page is not present in any of the specified database tables, then the usual filesystem-based PageDir and TemplateDir lookups will be performed.
Ordinary mode"Ordinary mode" requires that your tables are set up with at least the following columns:
The columns can be renamed, as long as Interchange is informed, using the PageTableMap local configuration directive. When a page is requested, the page name will be looked up using the "code" column. If the page is found then the "page_text" will be read and displayed. If the page is not found then the usual filesystem-based PageDir and TemplateDir lookups will be performed. "Teleport" modeIf the $Session->{teleport} key is set to a date/time value, in "%Y%m%d%H%M%S" format, then page lookups will be slightly different from ordinary mode lookups. "Teleport" mode requires that your tables are set up with at least the following columns:
It would be a good idea to also include a unique composite index on the "base_code", "show_date" and "expiration_date" columns. Again, the columns can be renamed, as long as Interchange is informed, using the PageTableMap local configuration directive. When a page is requested, the page name will be looked up using the "base_code", "show_date" and "expiration_date" columns. If a page is found, and the "teleport" date is within range, the "page_text" will be read and displayed. If more than one page is found to be valid, on the "teleport" date, then the page with the lowest "show_date" will be used. Again, if the page is not found then the usual filesystem-based PageDir and TemplateDir lookups will be performed.
See also
|
| Home | Legal nonsense | Privacy policy | Contact us |