[Zope-CMF] Give a link to the ZCatalog Search Results?

Florent Guillaume fg at nuxeo.com
Tue Sep 14 05:52:40 EDT 2004


Hi,

That's not a CMF-specific question. Please ask this kind of question in
zope at zope.org

Florent

In article <20040914064326.68744.qmail at web8408.mail.in.yahoo.com> you write:
> 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
> _______________________________________________
> Zope-CMF maillist  -  Zope-CMF at lists.zope.org
> http://mail.zope.org/mailman/listinfo/zope-cmf
> 
> See http://collector.zope.org/CMF for bug reports and feature requests
> 


-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 71 59  http://nuxeo.com  mailto:fg at nuxeo.com


More information about the Zope-CMF mailing list