From f578f85e55cf5bf4467d2a282e12057a069bd8e2 Mon Sep 17 00:00:00 2001 From: "mbarnson%sisna.com" <> Date: Tue, 5 Nov 2002 11:09:15 +0000 Subject: A rather controversial new entry to the FAQ. See bug 107917. I decided one way for the Guide, based upon the code I see currently checked in. If I'm wrong, feel free to correct it! --- docs/sgml/faq.sgml | 35 +++++++++++++++++++++++++++++++++++ docs/xml/faq.xml | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) diff --git a/docs/sgml/faq.sgml b/docs/sgml/faq.sgml index 91380863f..d1968d8f8 100644 --- a/docs/sgml/faq.sgml +++ b/docs/sgml/faq.sgml @@ -1131,6 +1131,41 @@ Bugzilla Hacking + + + + What kind of style should I use for templatization? + + + + + Gerv and Myk suggest a 2-space endent, with embedded code sections on + their own line, in line with outer tags. Like this: + +[% IF foo %] + + [% FOREACH x = barney %] + + + [% x %] + + + [% END %] +[% END %] + +]]> + + Myk also recommends you turn on PRE_CHOMP in the template + initialization to prevent bloating of HTML with unnecessary whitespace. + + + Please note that many have differing opinions on this subject, + and the existing templates in Bugzilla espouse both this and a 4-space + style. Either is acceptable; the above is preferred. + + + diff --git a/docs/xml/faq.xml b/docs/xml/faq.xml index 91380863f..d1968d8f8 100644 --- a/docs/xml/faq.xml +++ b/docs/xml/faq.xml @@ -1131,6 +1131,41 @@ Bugzilla Hacking + + + + What kind of style should I use for templatization? + + + + + Gerv and Myk suggest a 2-space endent, with embedded code sections on + their own line, in line with outer tags. Like this: + +[% IF foo %] + + [% FOREACH x = barney %] + + + [% x %] + + + [% END %] +[% END %] + +]]> + + Myk also recommends you turn on PRE_CHOMP in the template + initialization to prevent bloating of HTML with unnecessary whitespace. + + + Please note that many have differing opinions on this subject, + and the existing templates in Bugzilla espouse both this and a 4-space + style. Either is acceptable; the above is preferred. + + + -- cgit v1.2.3-24-g4f1b