[Zope-CMF] Give a link to the ZCatalog Search Results?
vaibhav uprety
uprety_vaibhav at yahoo.co.in
Tue Sep 14 02:43:26 EDT 2004
Hi,
I have made a ZCatalog which catalogs the files on the
basis of their Id and title.
After passing the search parameters to the report form
I get the desired results in form of Id, Title and URL
of the object.
But i want to display the URL of the objects found in
form of a "hyperlink", so that the users can see the
files by directly clicking on them.
here is the report page
------------------------------------------------------
<html><body>
<html>
<body tal:define="results here/test_catalog;
start request/start|python:0;
batch
python:modules['ZTUtils'].Batch(results,
size=20,
start=start);
previous python:batch.previous;
next python:batch.next">
<p>
<a tal:condition="previous"
tal:attributes="href
string:${request/URL0}?start:int=${previous/first}"
href="previous_url">previous <span
tal:replace="previous/length">20</span> results</a>
<a tal:condition="next"
tal:attributes="href
string:${request/URL0}?start:int=${next/first}"
href="next_url">next <span
tal:replace="next/length">20</span> results</a>
</p>
<table border>
<tr>
<th>Id</th>
<th>Title</th>
<th>URL</th>
</tr>
<div tal:repeat="result batch" >
<tr>
<td><span tal:replace="result/id">id goes
here</span></td>
<td><span tal:replace="result/title">title
goes here</span></td>
<td><span tal:replace="result/getURL">URL
goes here</span></td>
</tr>
</div>
</table>
<p>
<a tal:condition="previous"
tal:attributes="href
string:${request/URL0}?start:int=${previous/first}"
href="previous_url">previous <span
tal:replace="previous/length">20</span> results</a>
<a tal:condition="next"
tal:attributes="href
string:${request/URL0}?start:int=${next/first}"
href="next_url">next <span
tal:replace="next/length">20</span> results</a>
</p>
</body>
</html>
</body></html>
------------------------------------------------------
The output i get is like this
------------------------------------------------------
Id Title URL
mysql rama http://localhost:8080/tester/test/mysql
mysql1 rama1 http://localhost:8080/tester/test/mysql1
------------------------------------------------------
Presently the URL is displayed only as a text,i want
to display it as a "hyperlink". Thanks in advance.
VAIBHAV UPRETY
________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony
More information about the Zope-CMF
mailing list