diff --git a/mozilla/webtools/bugzilla/docs/sgml/faq.sgml b/mozilla/webtools/bugzilla/docs/sgml/faq.sgml index 91380863fa3..d1968d8f844 100644 --- a/mozilla/webtools/bugzilla/docs/sgml/faq.sgml +++ b/mozilla/webtools/bugzilla/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/mozilla/webtools/bugzilla/docs/xml/faq.xml b/mozilla/webtools/bugzilla/docs/xml/faq.xml index 91380863fa3..d1968d8f844 100644 --- a/mozilla/webtools/bugzilla/docs/xml/faq.xml +++ b/mozilla/webtools/bugzilla/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. + + +