andrew cooke wrote:
for the record, the (or, at least, a) solution is:
<ul tal:repeat="item root/Plone/timesheets/sql/list_people"> <li tal:content="item/person">name</li> </ul>
... i have the folder "timesheets" defined inside my root folder. as two subfolders i have "sql" and "ztp"
in /timesheets/sql are two SQL methods: add_person and list_people. the SQL method /timesheets/sql/list_people returns a list of people from a table. this works (the "test" button produces results; the column name is "person").
but how do i get that data displayed in the ZTP page? i have a page in the /timesheets/ztp folder (also called "list_people") with the following text, but it won't compile:
<ul tal:repeat="item /timesheets/sql/list_people"> <li tal:content="item/person">name</li> </ul>
the error message is: Compilation failed TAL.TALDefs.TALError: Invalid variable name "" in expression '/timesheets/sql/list_people'
my problem seems to be accessing the sql method that is "../sql/list_people" relative to the location of the ztp page. how i do this? or is the problem elsewhere?
I'm not sure what the structure of your site is from the description above, but you can probably (and probably should) let acquisition do the work instead of referring to the root::
<ul tal:repeat="item context/timesheets/sql/list_people"> <li tal:content="item/person">name</li> </ul> or something like that. --jcc -- "My point and period will be throughly wrought, Or well or ill, as this day's battle's fought."