Seems I overlooked the obvious..!
Thanks DenesL :0)
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are
Rows objects have an .xml() method that serializes them to a SQLTABLE, so
when you include them directly in a view (e.g., {{=rows}}) or inside
another HTML helper (such as TABLE), you get a TABLE. In short, no need to
wrap it in TABLE().
Anthony
On Saturday, October 24, 2015 at 9:22:59 AM
Also, note that the reason for the odd behavior is that TABLE must take one
of the HTML elements that is allowed inside the tag, such as tbody,
thead, tfoot, tr, col, or colgroup). If you pass anything else, it will be
wrapped in a TR by default.
Anthony
On Saturday, October 24, 2015 at
Thanks Anthony,
The reason I was trying TABLE was because I wanted to include a class in
the table tag and was thinking this might work...
TABLE(rows, _class="fred")
taking account of your answer I'm now using...
table_as_string = ''+rows.xml(0)[7:]
--
Resources:
- http://web2py.com
-
You can do
SQLTABLE(rows, _class="fred")
On Saturday, October 24, 2015 at 5:29:17 PM UTC-4, Edward Shave wrote:
>
> Thanks Anthony,
>
> The reason I was trying TABLE was because I wanted to include a class in
> the table tag and was thinking this might work...
>
> TABLE(rows, _class="fred")
>
5 matches
Mail list logo