Difference between revisions of "Template talk:PrettyXHTMLtable"

From GTAMods Wiki
Jump to navigation Jump to search
(Providing usage instructions.)
 
m (Requesting help, since MediaWiki keeps screwing it up.)
Line 1: Line 1:
 
==Usage==
 
==Usage==
You can use the <nowiki>{{PrettyXHTMLtable}}</nowiki> template instead of typing out all the XHTML attributes every time.  This template is for building tables using XHTML markup; there is a different [[Template:Prettytable|template for MediaWiki code]].
+
You can use the <nowiki>{{PrettyXHTMLtable}}</nowiki> template instead of typing out all the XHTML attributes every time.  This template is for building tables using XHTML markup: there is a different [[Template:Prettytable|template for MediaWiki coded tables]].
  
 
The following is the markup for a simple table:
 
The following is the markup for a simple table:
  <nowiki>{| {{prettytable}}
+
  <nowiki><table {{PrettyXHTMLtable}}>
! Column
+
<tr>
! Column
+
  <th scope="col">Column 1</th>
! Column
+
  <th scope="col">Column 2</th>
|-
+
  <th scope="col">Column 3</th>
| Value
+
</tr>
| Value
+
<tr>
| Value
+
  <td>Value (1,1)</td>
|-
+
  <td>Value (1,2)</td>
| 2nd row
+
  <td>Value (1,3)</td>
| 2nd row
+
</tr>
| 2nd row
+
<tr>
|}</nowiki>
+
  <td>Value (2,1)</td>
 +
  <td>Value (2,2)</td>
 +
  <td>Value (2,3)</td>
 +
</tr>
 +
</table></nowiki>
  
 
The above code will turn into the following table when saved:
 
The above code will turn into the following table when saved:
{{prettyxhtmltable}}
+
<table {{PrettyXHTMLtable}}>
<tr>
+
<tr>
<th>Column</th>
+
  <th scope="col">Column 1</th>
<th>Column</th>
+
  <th scope="col">Column 2</th>
<th>Column</th>
+
  <th scope="col">Column 3</th>
</tr>
+
</tr>
<tr>
+
<tr>
<td>Value</td>
+
  <td>Value (1,1)</td>
<td>Value</td>
+
  <td>Value (1,2)</td>
<td>Value</td>
+
  <td>Value (1,3)</td>
</tr>
+
</tr>
<tr>
+
<tr>
<td>2nd row</td>
+
  <td>Value (2,1)</td>
<td>2nd row</td>
+
  <td>Value (2,2)</td>
<td>2nd row</td>
+
  <td>Value (2,3)</td>
</tr>
+
</tr>
 
</table>
 
</table>
  
 
== Comments ==
 
== Comments ==
''No comments have been added.''
+
Why doesn't this work? It should be adding the attributes into the <code><nowiki><table></nowiki></code> tag but it puts a couple of character entities there instead. --[[User:Cerbera|Cerbera]] 07:09, 6 Mar 2006 (Central Standard Time)

Revision as of 13:09, 6 March 2006

Usage

You can use the {{PrettyXHTMLtable}} template instead of typing out all the XHTML attributes every time. This template is for building tables using XHTML markup: there is a different template for MediaWiki coded tables.

The following is the markup for a simple table:

<table {{PrettyXHTMLtable}}>
 <tr>
  <th scope="col">Column 1</th>
  <th scope="col">Column 2</th>
  <th scope="col">Column 3</th>
 </tr>
 <tr>
  <td>Value (1,1)</td>
  <td>Value (1,2)</td>
  <td>Value (1,3)</td>
 </tr>
 <tr>
  <td>Value (2,1)</td>
  <td>Value (2,2)</td>
  <td>Value (2,3)</td>
 </tr>
</table>

The above code will turn into the following table when saved:

Column 1 Column 2 Column 3
Value (1,1) Value (1,2) Value (1,3)
Value (2,1) Value (2,2) Value (2,3)

Comments

Why doesn't this work? It should be adding the attributes into the <table> tag but it puts a couple of character entities there instead. --Cerbera 07:09, 6 Mar 2006 (Central Standard Time)