hi,

is it possible to using div using the web2py format that contain
looping and if else condition?
i found an error during convert my view :

from:

<DIV id = 'leftbar'>
{{=H1(title)}}
{{for i, row in enumerate(rows):}}
{{if i == items_per_page: break}}
{{=A(T(row.title), _href = URL("blog_show", args = row.id), _title =
T(row.title))}}
{{=BR()}}
{{pass}}
{{if page:}}
{{=A(T('Previous'), _href = URL(args = [page - 1]), _title =
T('Previous'))}}
{{pass}}
{{if len(rows) > items_per_page:}}
{{=A(T('Next'), _href = URL(args = [page + 1]), _title = T('Next'))}}
{{pass}}
</DIV>

into :

{{=DIV(H1(title),
for i, row in enumerate(rows):
if i == items_per_page: break
A(T(row.title), _href = URL("blog_show", args = row.id), _title =
T(row.title)),
BR(),
pass
if page:
A(T('Previous'), _href = URL(args = [page - 1]), _title =
T('Previous')),
pass
if len(rows) > items_per_page:
A(T('Next'), _href = URL(args = [page + 1]), _title = T('Next')),
pass
), _id = 'leftbar'}}

i know i'm wrong, please explain and show my fault, please

thank you so much

Reply via email to