]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
A rather controversial new entry to the FAQ. See bug 107917. I
authormbarnson%sisna.com <>
Tue, 5 Nov 2002 11:09:15 +0000 (11:09 +0000)
committermbarnson%sisna.com <>
Tue, 5 Nov 2002 11:09:15 +0000 (11:09 +0000)
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
docs/xml/faq.xml

index 91380863fa39d92b663821f2ae6b2bb3a3e1fe05..d1968d8f844830480a1ebf5f0b92ea4ba26b820b 100644 (file)
     <qandadiv id="faq-hacking">
       <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>
index 91380863fa39d92b663821f2ae6b2bb3a3e1fe05..d1968d8f844830480a1ebf5f0b92ea4ba26b820b 100644 (file)
     <qandadiv id="faq-hacking">
       <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>