1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
2 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
5 <meta name="generator" content="HTML Tidy, see www.w3.org">
7 Privoxy's Template Files
9 <meta name="GENERATOR" content=
10 "Modular DocBook HTML Stylesheet Version 1.79">
11 <link rel="HOME" title="Privoxy 3.0.18 User Manual" href="index.html">
12 <link rel="PREVIOUS" title="Filter Files" href="filter-file.html">
13 <link rel="NEXT" title=
14 "Contacting the Developers, Bug Reporting and Feature Requests" href=
16 <link rel="STYLESHEET" type="text/css" href="../p_doc.css">
17 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
18 <link rel="STYLESHEET" type="text/css" href="p_doc.css">
19 <style type="text/css">
21 background-color: #EEEEEE;
24 :link { color: #0000FF }
25 :visited { color: #840084 }
26 :active { color: #0000FF }
27 hr.c1 {text-align: left}
31 <div class="NAVHEADER">
32 <table summary="Header navigation table" width="100%" border="0"
33 cellpadding="0" cellspacing="0">
35 <th colspan="3" align="center">
36 Privoxy 3.0.18 User Manual
40 <td width="10%" align="left" valign="bottom">
41 <a href="filter-file.html" accesskey="P">Prev</a>
43 <td width="80%" align="center" valign="bottom">
45 <td width="10%" align="right" valign="bottom">
46 <a href="contact.html" accesskey="N">Next</a>
50 <hr width="100%" class="c1">
54 <a name="TEMPLATES">10. Privoxy's Template Files</a>
57 All <span class="APPLICATION">Privoxy</span> built-in pages, i.e.
58 error pages such as the <a href="http://show-the-404-error.page"
59 target="_top"><span class="QUOTE">"404 - No Such Domain"</span> error
60 page</a>, the <a href=
61 "http://ads.bannerserver.example.com/nasty-ads/sponsor.html" target=
62 "_top"><span class="QUOTE">"BLOCKED"</span> page</a> and all pages of
63 its <a href="http://config.privoxy.org/" target="_top">web-based user
64 interface</a>, are generated from <span class="emphasis"><i class=
65 "EMPHASIS">templates</i></span>. (<span class=
66 "APPLICATION">Privoxy</span> must be running for the above links to
70 These templates are stored in a subdirectory of the <a href=
71 "config.html#CONFDIR">configuration directory</a> called <tt class=
72 "FILENAME">templates</tt>. On Unixish platforms, this is typically <a
73 href="file:///etc/privoxy/templates/" target="_top"><tt class=
74 "FILENAME">/etc/privoxy/templates/</tt></a>.
77 The templates are basically normal HTML files, but with place-holders
78 (called symbols or exports), which <span class=
79 "APPLICATION">Privoxy</span> fills at run time. It is possible to
80 edit the templates with a normal text editor, should you want to
81 customize them. (<span class="emphasis"><i class="EMPHASIS">Not
82 recommended for the casual user</i></span>). Should you create your
83 own custom templates, you should use the <tt class=
84 "FILENAME">config</tt> setting <a href=
85 "config.html#TEMPLDIR">templdir</a> to specify an alternate location,
86 so your templates do not get overwritten during upgrades.
89 Note that just like in configuration files, lines starting with <tt
90 class="LITERAL">#</tt> are ignored when the templates are filled in.
93 The place-holders are of the form <tt class="LITERAL">@name@</tt>,
94 and you will find a list of available symbols, which vary from
95 template to template, in the comments at the start of each file. Note
96 that these comments are not always accurate, and that it's probably
97 best to look at the existing HTML code to find out which symbols are
98 supported and what they are filled in with.
101 A special application of this substitution mechanism is to make whole
102 blocks of HTML code disappear when a specific symbol is set. We use
103 this for many purposes, one of them being to include the beta warning
104 in all our user interface (CGI) pages when <span class=
105 "APPLICATION">Privoxy</span> is in an alpha or beta development
110 <table border="0" bgcolor="#E0E0E0" width="100%">
114 <!-- @if-unstable-start -->
116 ... beta warning HTML code goes here ...
118 <!-- if-unstable-end@ -->
125 If the "unstable" symbol is set, everything in between and including
126 <tt class="LITERAL">@if-unstable-start</tt> and <tt class=
127 "LITERAL">if-unstable-end@</tt> will disappear, leaving nothing but
132 <table border="0" bgcolor="#E0E0E0" width="100%">
143 There's also an if-then-else construct and an <tt class=
144 "LITERAL">#include</tt> mechanism, but you'll sure find out if you
145 are inclined to edit the templates ;-)
148 All templates refer to a style located at <a href=
149 "http://config.privoxy.org/send-stylesheet" target="_top"><tt class=
150 "LITERAL">http://config.privoxy.org/send-stylesheet</tt></a>. This
151 is, of course, locally served by <span class=
152 "APPLICATION">Privoxy</span> and the source for it can be found and
153 edited in the <tt class="FILENAME">cgi-style.css</tt> template.
156 <div class="NAVFOOTER">
157 <hr width="100%" class="c1">
158 <table summary="Footer navigation table" width="100%" border="0"
159 cellpadding="0" cellspacing="0">
161 <td width="33%" align="left" valign="top">
162 <a href="filter-file.html" accesskey="P">Prev</a>
164 <td width="34%" align="center" valign="top">
165 <a href="index.html" accesskey="H">Home</a>
167 <td width="33%" align="right" valign="top">
168 <a href="contact.html" accesskey="N">Next</a>
172 <td width="33%" align="left" valign="top">
175 <td width="34%" align="center" valign="top">
178 <td width="33%" align="right" valign="top">
179 Contacting the Developers, Bug Reporting and Feature Requests