summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormbarnson%sisna.com <>2002-11-05 12:09:15 +0100
committermbarnson%sisna.com <>2002-11-05 12:09:15 +0100
commitf578f85e55cf5bf4467d2a282e12057a069bd8e2 (patch)
tree6afa8211d31b0a29fa47dac12d0ef791168de3b6
parentb29dda83f1f6e02f631266495446e651a7834894 (diff)
downloadbugzilla-f578f85e55cf5bf4467d2a282e12057a069bd8e2.tar.gz
bugzilla-f578f85e55cf5bf4467d2a282e12057a069bd8e2.tar.xz
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!
-rw-r--r--docs/sgml/faq.sgml35
-rw-r--r--docs/xml/faq.xml35
2 files changed, 70 insertions, 0 deletions
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
@@ -1132,6 +1132,41 @@
<title>Bugzilla Hacking</title>
<qandaentry>
+ <question>
+ <para>
+ What kind of style should I use for templatization?
+ </para>
+ </question>
+ <answer>
+ <para>
+ Gerv and Myk suggest a 2-space endent, with embedded code sections on
+ their own line, in line with outer tags. Like this:</para>
+ <programlisting><![CDATA[
+<fred>
+[% IF foo %]
+ <bar>
+ [% FOREACH x = barney %]
+ <tr>
+ <td>
+ [% x %]
+ </td>
+ <tr>
+ [% END %]
+[% END %]
+</fred>
+]]></programlisting>
+
+ <para> Myk also recommends you turn on PRE_CHOMP in the template
+ initialization to prevent bloating of HTML with unnecessary whitespace.
+ </para>
+
+ <para>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.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
<question>
<para>
What bugs are in Bugzilla right now?
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
@@ -1132,6 +1132,41 @@
<title>Bugzilla Hacking</title>
<qandaentry>
+ <question>
+ <para>
+ What kind of style should I use for templatization?
+ </para>
+ </question>
+ <answer>
+ <para>
+ Gerv and Myk suggest a 2-space endent, with embedded code sections on
+ their own line, in line with outer tags. Like this:</para>
+ <programlisting><![CDATA[
+<fred>
+[% IF foo %]
+ <bar>
+ [% FOREACH x = barney %]
+ <tr>
+ <td>
+ [% x %]
+ </td>
+ <tr>
+ [% END %]
+[% END %]
+</fred>
+]]></programlisting>
+
+ <para> Myk also recommends you turn on PRE_CHOMP in the template
+ initialization to prevent bloating of HTML with unnecessary whitespace.
+ </para>
+
+ <para>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.</para>
+ </answer>
+ </qandaentry>
+
+ <qandaentry>
<question>
<para>
What bugs are in Bugzilla right now?