| 93 | == How it works |
| 94 | |
| 95 | First the plugin counts the @column keywords. Then it iterates, using that number, to find data for all cells in each row. If a cell is missing, it will fail with an error. The solution then is to either add data for the missing cell (which might be hard to find, depending on the complexity of the table), or use the @endrow keyword to prematurely finish the row and consider all missing cells empty. Using this keyword the whole table syntax can still be very short, if the table contains a lot of columns and a lot of empty cells. |
| 96 | |
| 97 | {{{ |
| 98 | |
| 99 | {{{ |
| 100 | #!styledtable |
| 101 | #!-- Demonstration of the keyword @endrow |
| 102 | |
| 103 | @table (@default) |
| 104 | |
| 105 | #!-- Define the three columns to use: task, details, status |
| 106 | @column task |
| 107 | @column details |
| 108 | @column status |
| 109 | |
| 110 | #!-- First row is header |
| 111 | @task: Task |
| 112 | @details: Details |
| 113 | @status: Status |
| 114 | |
| 115 | #!-- Second row is missing two fields and would generate an |
| 116 | #!-- error if we didn't use @endrow to fill in with empty cells |
| 117 | @task: My first task |
| 118 | @endrow |
| 119 | }}} |
| 120 | |
| 121 | }}} |
| 122 | |
| 123 | |