Summary
Renders an HTML table.
- Assembly
- Wyam
.Core .dll - Namespace
- Wyam
.Core .Shortcodes .Html - Interfaces
- Base Types
-
- Object
graph BT
Type-->Base0["Object"]
Type-.->Interface0["IShortcode"]
click Interface0 "/api/Wyam.Common.Shortcodes/IShortcode"
Type["Table"]
class Type type-node
Syntax
public class Table : IShortcode
Examples
Example usage:
<?# Table Class=table HeaderRows=1 ?>
<?*
Vehicle "Number Of Wheels"
Bike 2
Car 4
Truck "A Whole Lot"
?>
<?#/ Table ?>
Example output:
<table class="table">
<thead>
<tr>
<th>Vehicle</th>
<th>Number Of Wheels</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bike</td>
<td>2</td>
</tr>
<tr>
<td>Car</td>
<td>4</td>
</tr>
<tr>
<td>Truck</td>
<td>A Whole Lot</td>
</tr>
</tbody>
</table>
Remarks
The content of the shortcode contains the table with each row on a new line and each
column separated by new lines. Enclose columns in quotes if they contain a space.
Note that since the content of a shortcode may get processed by template engines like
Markdown and the content of this shortcode should not be, you probably want to wrap
the shortcode content in the special XML processing instruction that will get trimmed
like
<?* ... ?>
so it "passes through" any template engines (see example below).
Methods
Name | Value | Summary |
---|---|---|
Execute |
IShortcodeResult |
Executes the shortcode and returns an
Wyam.Common.Shortcodes.IShortcodeResult .
|