If you pass something to TABLE() that isn't a table row object, it assumes
it needs to wrap it in a row and cell. If you've already got the entire
table as an HTML string, there's not much benefit to wrapping it in TABLE()
anyway. Just do:
html = CAT(H4('Search Results'), XML('<table
class="centered_table">%s</table>' % table_html))
Anthony
On Friday, August 16, 2013 11:21:43 AM UTC-4, [email protected] wrote:
>
> I have this line:
>
> html = CAT(H4('Search Results'), TABLE(table_html, _CLASS=
> "centered_table"))
>
> using print statements I see that *html* is:
> <h4>Search Results</h4><table CLASS="centered_table"><tr><td><tr><th>
> Build</th><th>Block Name</th><th>Full Variable Path</th></tr><tr><td>
> build1</td><td>FOOD_BLOCK</td><td>Header</td><td><a class="viewtree_link"
> href="/namebrowser/default/browse_block/build1/FOOD_BLOCK/1">View in Tree
> </a></td></tr></td></tr></table>
>
>
> whereas *table_html* was
> <tr><th>Build</th><th>Block Name</th><th>Full Variable Path
> </th></tr><tr><td>build1</td><td>FOOD_BLOCK</td><td>Header</td><td><a
> class="viewtree_link" href=
> "/namebrowser/default/browse_block/build1/FOOD_BLOCK/1">View in Tree
> </a></td></tr>
>
>
>
> When I make *html*, why is *table_html* being wrapped inside a table cell
> (see highlighted tags in *html*)? What is the correct way to add table
> row html inside of the TABLE() helper?
>
>
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.