X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=doc%2Fwebserver%2Fuser-manual%2Ftemplates.html;h=e2879be2b2e282205e87fecb5749d87e84f1d5d3;hp=413bd178b910ae498ad44730d9f75a18a40ebe43;hb=7a99a61ab1a3ce0401821aedcd06eba19a698b2a;hpb=2d4220ee5eb5a555f4d9f93fcb4ceac3a0ea379b diff --git a/doc/webserver/user-manual/templates.html b/doc/webserver/user-manual/templates.html index 413bd178..e2879be2 100644 --- a/doc/webserver/user-manual/templates.html +++ b/doc/webserver/user-manual/templates.html @@ -1,321 +1,158 @@ - -Privoxy's Template Files - -
Privoxy 3.0.17 User Manual
PrevNext

10. Privoxy's Template Files

All Privoxy built-in pages, i.e. error pages such as the - "404 - No Such Domain" - error page, the "BLOCKED" - page - and all pages of its web-based - user interface, are generated from templates. - (Privoxy must be running for the above links to work as - intended.)

These templates are stored in a subdirectory of the configuration - directory called templates. On Unixish platforms, - this is typically - /etc/privoxy/templates/.

The templates are basically normal HTML files, but with place-holders (called symbols - or exports), which Privoxy fills at run time. It - is possible to edit the templates with a normal text editor, should you want - to customize them. (Not recommended for the casual - user). Should you create your own custom templates, you should use - the config setting templdir - to specify an alternate location, so your templates do not get overwritten - during upgrades. -

Note that just like in configuration files, lines starting - with # are ignored when the templates are filled in.

The place-holders are of the form @name@, and you will - find a list of available symbols, which vary from template to template, - in the comments at the start of each file. Note that these comments are not - always accurate, and that it's probably best to look at the existing HTML - code to find out which symbols are supported and what they are filled in with.

A special application of this substitution mechanism is to make whole - blocks of HTML code disappear when a specific symbol is set. We use this - for many purposes, one of them being to include the beta warning in all - our user interface (CGI) pages when Privoxy - is in an alpha or beta development stage:

+ +
<!-- @if-unstable-start -->
+
+
+
+
+  Privoxy's Template Files
+  
+  
+  
+  
+  
+  
+  
+
+
+
+  
+
+  
+

10. Privoxy's + Template Files

+ +

All Privoxy built-in pages, i.e. + error pages such as the "404 - No Such Domain" error page, + the "BLOCKED" page and all pages + of its web-based user + interface, are generated from templates. (Privoxy must be running for the above links to work + as intended.)

+ +

These templates are stored in a subdirectory of the configuration directory called templates. On Unixish platforms, this is typically + /etc/privoxy/templates/.

+ +

The templates are basically normal HTML files, but with place-holders + (called symbols or exports), which Privoxy fills at run time. It is possible to edit + the templates with a normal text editor, should you want to customize + them. (Not recommended for the + casual user). Should you create your own custom templates, you + should use the config setting templdir to specify an alternate location, so + your templates do not get overwritten during upgrades.

+ +

Note that just like in configuration files, lines starting with + # are ignored when the templates are filled + in.

+ +

The place-holders are of the form @name@, and + you will find a list of available symbols, which vary from template to + template, in the comments at the start of each file. Note that these + comments are not always accurate, and that it's probably best to look at + the existing HTML code to find out which symbols are supported and what + they are filled in with.

+ +

A special application of this substitution mechanism is to make whole + blocks of HTML code disappear when a specific symbol is set. We use this + for many purposes, one of them being to include the beta warning in all + our user interface (CGI) pages when Privoxy is in an alpha or beta development + stage:

+ + + +
+
+<!-- @if-unstable-start -->
 
   ... beta warning HTML code goes here ...
 
-<!-- if-unstable-end@ -->

If the "unstable" symbol is set, everything in between and including - @if-unstable-start and if-unstable-end@ - will disappear, leaving nothing but an empty comment:

<!--  -->

There's also an if-then-else construct and an #include - mechanism, but you'll sure find out if you are inclined to edit the - templates ;-)

All templates refer to a style located at - http://config.privoxy.org/send-stylesheet. - This is, of course, locally served by Privoxy - and the source for it can be found and edited in the - cgi-style.css template.


PrevHomeNext
Filter Files Contacting the Developers, Bug Reporting and Feature -Requests
\ No newline at end of file +<!-- if-unstable-end@ --> +
+
+ +

If the "unstable" symbol is set, everything in between and including + @if-unstable-start and if-unstable-end@ will disappear, leaving nothing but an + empty comment:

+ + + + + +
+
+<!--  -->
+
+
+ +

There's also an if-then-else construct and an #include mechanism, but you'll sure find out if you are + inclined to edit the templates ;-)

+ +

All templates refer to a style located at http://config.privoxy.org/send-stylesheet. This is, of + course, locally served by Privoxy and + the source for it can be found and edited in the cgi-style.css template.

+
+ + + +