From b1b9352fb358d2ce2d61bc1c7836c27964e105ec Mon Sep 17 00:00:00 2001 From: "jocuri%softhome.net" <> Date: Wed, 7 Apr 2004 23:36:34 +0000 Subject: Patch for bug 233245: update documentation of formats to include ctypes as well; patch by Niels Reedijk slightly modified by me. --- docs/xml/customization.xml | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) (limited to 'docs/xml/customization.xml') diff --git a/docs/xml/customization.xml b/docs/xml/customization.xml index 418ce89b6..e52f0a636 100644 --- a/docs/xml/customization.xml +++ b/docs/xml/customization.xml @@ -143,21 +143,28 @@
- Template Formats + Template Formats and Types - Some CGIs have the ability to use more than one template. For - example, buglist.cgi can output bug lists as RDF or two - different forms of HTML (complex and simple). (Try this out - by appending &format=simple to a buglist.cgi - URL on your Bugzilla installation.) This - mechanism, called template 'formats', is extensible. + Some CGI's have the ability to use more than one template. For example, + buglist.cgi can output itself as RDF, or as two + formats of HTML (complex and simple). The mechanism that provides this + feature is extensible. + + + + Bugzilla can support different types of output, which again can have + multiple formats. In order to request a certain type, you can append + the &ctype=<contenttype> (such as rdf or html) to the + <cginame>.cgi URL. If you would like to + retrieve a certain format, you can use the &format=<format> + (such as simple or complex) in the URL. - To see if a CGI supports multiple output formats, grep the + To see if a CGI supports multiple output formats and types, grep the CGI for "GetFormat". If it's not present, adding - multiple format support isn't too hard - see how it's done in + multiple format/type support isn't too hard - see how it's done in other CGIs, e.g. config.cgi. @@ -176,17 +183,27 @@ You now need to decide what content type you want your template - served as. Open up the localconfig file and find the + served as. The content types are defined in the + Bugzilla/Constants.pm file in the $contenttypes variable. If your content type is not there, add it. Remember the three- or four-letter tag assigned to you content type. This tag will be part of the template filename. + + + + After adding or changing a content type, it's suitable to edit + Bugzilla/Constants.pm in order to reflect + the changes. Also, the file should be kept up to date after an + upgrade if content types have been customized in the past. + + Save the template as <stubname>-<formatname>.<contenttypetag>.tmpl. Try out the template by calling the CGI as - <cginame>.cgi?format=<formatname> . + <cginame>.cgi?format=<formatname>&ctype=<type> .
-- cgit v1.2.3-24-g4f1b