Is there any way to define your own helper-like function that will generate a bit of parameterized HTML? What I'd like to do is:
<table> <tr> {{=TD_custom(data["field1"])}} {{=TD_custom(data["field2"])}} {{=TD_custom(data["field3"])}} {{=TD_custom(data["field4"])}} {{=TD_custom(data["field5"])}} {{=TD_custom(data["field6"])}} {{=TD_custom(data["field7"])}} ... <tr> <table> where the function is defined somewhere in my files: def TD_custom(string) : return TD(DIV(string, _class="custom", ...)) Something that would allow me to avoid duplicating the detailed structure of the <td> for every field. -- 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 subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.