1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
2 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
6 Privoxy's Template Files
8 <meta name="GENERATOR" content=
9 "Modular DocBook HTML Stylesheet Version 1.79">
10 <link rel="HOME" title="Privoxy 3.0.25 User Manual" href="index.html">
11 <link rel="PREVIOUS" title="Filter Files" href="filter-file.html">
12 <link rel="NEXT" title=
13 "Contacting the Developers, Bug Reporting and Feature Requests" href=
15 <link rel="STYLESHEET" type="text/css" href="../p_doc.css">
16 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
17 <link rel="STYLESHEET" type="text/css" href="p_doc.css">
19 <body class="SECT1" bgcolor="#EEEEEE" text="#000000" link="#0000FF" vlink=
20 "#840084" alink="#0000FF">
21 <div class="NAVHEADER">
22 <table summary="Header navigation table" width="100%" border="0"
23 cellpadding="0" cellspacing="0">
25 <th colspan="3" align="center">
26 Privoxy 3.0.25 User Manual
30 <td width="10%" align="left" valign="bottom">
31 <a href="filter-file.html" accesskey="P">Prev</a>
33 <td width="80%" align="center" valign="bottom">
35 <td width="10%" align="right" valign="bottom">
36 <a href="contact.html" accesskey="N">Next</a>
40 <hr align="LEFT" width="100%">
44 <a name="TEMPLATES">10. Privoxy's Template Files</a>
47 All <span class="APPLICATION">Privoxy</span> built-in pages, i.e.
48 error pages such as the <a href="http://show-the-404-error.page"
49 target="_top"><span class="QUOTE">"404 - No Such Domain"</span> error
50 page</a>, the <a href=
51 "http://ads.bannerserver.example.com/nasty-ads/sponsor.html" target=
52 "_top"><span class="QUOTE">"BLOCKED"</span> page</a> and all pages of
53 its <a href="http://config.privoxy.org/" target="_top">web-based user
54 interface</a>, are generated from <span class="emphasis"><i class=
55 "EMPHASIS">templates</i></span>. (<span class=
56 "APPLICATION">Privoxy</span> must be running for the above links to
60 These templates are stored in a subdirectory of the <a href=
61 "config.html#CONFDIR">configuration directory</a> called <tt class=
62 "FILENAME">templates</tt>. On Unixish platforms, this is typically <a
63 href="file:///etc/privoxy/templates/" target="_top"><tt class=
64 "FILENAME">/etc/privoxy/templates/</tt></a>.
67 The templates are basically normal HTML files, but with place-holders
68 (called symbols or exports), which <span class=
69 "APPLICATION">Privoxy</span> fills at run time. It is possible to
70 edit the templates with a normal text editor, should you want to
71 customize them. (<span class="emphasis"><i class="EMPHASIS">Not
72 recommended for the casual user</i></span>). Should you create your
73 own custom templates, you should use the <tt class=
74 "FILENAME">config</tt> setting <a href=
75 "config.html#TEMPLDIR">templdir</a> to specify an alternate location,
76 so your templates do not get overwritten during upgrades.
79 Note that just like in configuration files, lines starting with <tt
80 class="LITERAL">#</tt> are ignored when the templates are filled in.
83 The place-holders are of the form <tt class="LITERAL">@name@</tt>,
84 and you will find a list of available symbols, which vary from
85 template to template, in the comments at the start of each file. Note
86 that these comments are not always accurate, and that it's probably
87 best to look at the existing HTML code to find out which symbols are
88 supported and what they are filled in with.
91 A special application of this substitution mechanism is to make whole
92 blocks of HTML code disappear when a specific symbol is set. We use
93 this for many purposes, one of them being to include the beta warning
94 in all our user interface (CGI) pages when <span class=
95 "APPLICATION">Privoxy</span> is in an alpha or beta development
100 <table border="0" bgcolor="#E0E0E0" width="100%">
104 <!-- @if-unstable-start -->
106 ... beta warning HTML code goes here ...
108 <!-- if-unstable-end@ -->
115 If the "unstable" symbol is set, everything in between and including
116 <tt class="LITERAL">@if-unstable-start</tt> and <tt class=
117 "LITERAL">if-unstable-end@</tt> will disappear, leaving nothing but
122 <table border="0" bgcolor="#E0E0E0" width="100%">
133 There's also an if-then-else construct and an <tt class=
134 "LITERAL">#include</tt> mechanism, but you'll sure find out if you
135 are inclined to edit the templates ;-)
138 All templates refer to a style located at <a href=
139 "http://config.privoxy.org/send-stylesheet" target="_top"><tt class=
140 "LITERAL">http://config.privoxy.org/send-stylesheet</tt></a>. This
141 is, of course, locally served by <span class=
142 "APPLICATION">Privoxy</span> and the source for it can be found and
143 edited in the <tt class="FILENAME">cgi-style.css</tt> template.
146 <div class="NAVFOOTER">
147 <hr align="LEFT" width="100%">
148 <table summary="Footer navigation table" width="100%" border="0"
149 cellpadding="0" cellspacing="0">
151 <td width="33%" align="left" valign="top">
152 <a href="filter-file.html" accesskey="P">Prev</a>
154 <td width="34%" align="center" valign="top">
155 <a href="index.html" accesskey="H">Home</a>
157 <td width="33%" align="right" valign="top">
158 <a href="contact.html" accesskey="N">Next</a>
162 <td width="33%" align="left" valign="top">
165 <td width="34%" align="center" valign="top">
168 <td width="33%" align="right" valign="top">
169 Contacting the Developers, Bug Reporting and Feature Requests