Gossamer Forum
Home : Products : DBMan SQL : Discussion :

walking through a complex datastructure with a template

Quote Reply
walking through a complex datastructure with a template
Hi,

Does anyone know if it is possible to get data from within a complex datastructure in a template?

For example: in seach results, I would like to access the column 'name' from the third row of the result list. I tried things like
Code:
<%results.[2].name%>
,
Code:
<%results->[2]{name}%>
and variations, but I cannot get it to work.

Any suggestions?

Thanks, Jasper

http://www.bookings.org
Quote Reply
Re: [jaspercram] walking through a complex datastructure with a template In reply to
You can use:

<%loop results%>
<%if row_num == 3%>
print the information
<%lastloop%>
<%endif%>
<%endloop%>

Hope that helps.

TheStone.

B.
Quote Reply
Re: [TheStone] walking through a complex datastructure with a template In reply to
Hi Stone,

Thanks for your solution, but my example was actually a bit simplified. Crazy I would want some data from the home tag, like the form_display value for a certain certain column and a list with column names.

Thanks, Jasper

http://www.bookings.org