Hi, hope you can help.

We are currently linking a webpage to an SQL database and are pulling in information via the tal:replace function. This is working extremely well however one of our SQL fields is comma deliminated, and we want it to appear as a list. We have accomplished this by using the following code:

<h1>Interests</h1>

<tal:x define="test2 result/interests"
      repeat="id python:interests.split(',')">
 <p><a href=""
    tal:attributes="href string:detail_html?id=$id"
    tal:content="result/interests"
>Interests goes here</a></p>
</tal:x>

This works well, and each item of text is displayed as a list item. Only problem we have, is we want to be able to display the SQL text as the link name, but instead each link has the same link text which is the whole of the SQL string.

E.g. The text in the interests field is: Swimming,Badminton,Ice Hockey <detail_html?id=Swimming>

The code seperates the text via the comma, and displays a list item for each activity. Only problem is, the link text for each activity is the same (Swimming,Badminton,Ice Hockey <detail_html?id=Swimming>). Anyone got any ideas?

Hope you can understand what I am after.  An example page is at:

http://lash.sunderland.ac.uk/business/organisationandstaff/test/detail_html?id=10

Thanks
Phil
begin:vcard
fn:Phil Beardmore
n:Beardmore;Phil
org:University of Sunderland;Sunderland Business School
email;internet:[EMAIL PROTECTED]
title:Senior IT/Network Technician
tel;work:0191 515 3436
tel;cell:07766805820
version:2.1
end:vcard

_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to