| 60 | |
| 61 | ----- |
| 62 | == Some Patches == |
| 63 | I added below to render_macro to provide a rudimentary sort of variable function. |
| 64 | |
| 65 | |
| 66 | {{{ |
| 67 | def render_macro(self, req, name, content): |
| 68 | + c = content.split("|") |
| 69 | + content = c[0] |
| 70 | + if len(c) > 1 : |
| 71 | + for i in c[1:] : |
| 72 | + v = i.split("=") |
| 73 | + if len(v) > 1 : |
| 74 | + k = v[0] |
| 75 | + v = v[1] |
| 76 | + content = content.replace(k,v) |
| 77 | }}} |
| 78 | |
| 79 | i.e. you can do something like this |
| 80 | {{{ |
| 81 | {{{ |
| 82 | #!SQLTable |
| 83 | SELECT "a", count($id) as 'Number of Tickets' |
| 84 | FROM ticket |
| 85 | UNION |
| 86 | SELECT "b", count($id) as 'Number of Tickets' |
| 87 | FROM ticket|$id=id |
| 88 | }}} |
| 89 | }}} |
| 90 | Useful when you have the same id that you don't want to keep on retyping over. |
| 91 | ----- |