Pagenews website
Home
Features
Download
System requirements
Websites using it
How to install
Screenshots
Documentation
FAQ
Demo installation
Links
Contact



Pagenews website
Copyright (C) 2004,2005,2006
by Philipp Kindt



Erdstrahlen Freie Webseite!



The Pagenews documentation - index - back
The Pagenews template load hierarchy

Content
Introduction
The main template
Linking templates
Child-templatesy


Introduction
This document describes how Pagenews determines which template is to be loaded. The browser's query string is used to call a tempalte. A query string is everything behind the ? in the URL of news.cgi. If you type http://www.philippkindt.de/pagenews/cgi-bin/news.cgi?do=home&main_template=main into your browser's address-bar, the query-string would be do=home&main_template=main. do is a key that has the value home.

The main template
The main template is loaded first. It is called "main" by default. The main template contains code that loads the template that has the name specified by the query-strings field do. You can change the main template itself by giving a key called main_template having the name of the new main template in the query string. If main_template has got the value donparser_no_main_template, no main template is loaded, and the first template that is loaded is the template specified by the do key.

How to link a template
How do you normally link a template? Simply create a hyperlink having the href-value ?do=template, for example
<a href = "?do=mytemplate">My Template<a>

Child-templates
Templates can contain child templates, that are included by Donparser-code, a FILE-handler for example. (see writing templates) They are simply included into a template you've linked on.
The Pagenews documentation - index - back





-> admin log-in

Powered by Pagenews DN 6.1.2 by Philipp Kindt