Michel, <a href="/<!--#var "Catalog.getpath(data_record_id_)"-->"> works fine inside the Catalog folder, but outside the folder even using <!--#with Catalog--> I get this traceback: <P> <STRONG>Error Type: AttributeError</STRONG><BR> <STRONG>Error Value: getpath</STRONG><BR> </P> <!-- Traceback (innermost last): File /home/mike_weltz/Zope/lib/python/ZPublisher/Publish.py, line 256, in publish_module File /home/mike_weltz/Zope/lib/python/ZPublisher/Publish.py, line 161, in publish File /home/mike_weltz/Zope/lib/python/ZPublisher/mapply.py, line 154, in mapply (Object: index_html) File /home/mike_weltz/Zope/lib/python/ZPublisher/Publish.py, line 98, in call_object (Object: index_html) File /home/mike_weltz/Zope/lib/python/OFS/DTMLMethod.py, line 150, in __call__ (Object: index_html) File /home/mike_weltz/Zope/lib/python/OFS/DTMLMethod.py, line 145, in __call__ (Object: index_html) File /home/mike_weltz/Zope/lib/python/DocumentTemplate/DT_String.py, line 502, in __call__ (Object: index_html) File /home/mike_weltz/Zope/lib/python/DocumentTemplate/DT_With.py, line 148, in render (Object: _(recruiter_stuff=Catalog(recruiter=AUTHENTICATED_USER.getUserName()))) File /home/mike_weltz/Zope/lib/python/Products/Calendar/CalendarTag.py, line 206, in render File /home/mike_weltz/Zope/lib/python/Products/Calendar/CalendarTag.py, line 268, in render_day_ File /home/mike_weltz/Zope/lib/python/DocumentTemplate/DT_In.py, line 689, in renderwob (Object: recruiter_stuff) File /home/mike_weltz/Zope/lib/python/DocumentTemplate/DT_Util.py, line 315, in eval (Object: Catalog.getpath(data_record_id_)) File <string>, line 0, in ? File /home/mike_weltz/Zope/lib/python/DocumentTemplate/DT_Util.py, line 126, in careful_getattr AttributeError: (see above) --> Is there another way of getting the url of the object you want for a link? All my best, Jason Spisak webmaster@mtear.com
Jason Spisak wrote:
Michel,
<a href="/<!--#var "Catalog.getpath(data_record_id_)"-->"> works fine inside the Catalog folder, but outside the folder even using <!--#with Catalog--> I get this traceback:
<P> <STRONG>Error Type: AttributeError</STRONG><BR> <STRONG>Error Value: getpath</STRONG><BR> </P>
<snip>
AttributeError: (see above)
Works dandy for me. Here's the two methods I used in the same folder as the catalog (not in the catalog). I think it would be a good idea to provide some stock search and result pages with the Catalog for people to expand upon. -Michel <!--#var standard_html_header--> <form action="r" method="get"> <h2><!--#var document_title--></h2> Enter query parameters:<br><table> <tr><th>Title</th> <td><input name="title" width=30 value=""></td></tr> <tr><th>Id</th> <td><input name="id" width=30 value=""></td></tr> <tr><th>Meta type</th> <td><input name="meta_type" width=30 value=""></td></tr> <tr><th>PrincipiaSearchSource</th> <td><input name="PrincipiaSearchSource" width=30 value=""></td></tr> <tr><th>Bobobase modification time</th> <td><input name="bobobase_modification_time" width=30 value=""></td></tr> <tr><td colspan=2 align=center> <input type="SUBMIT" name="SUBMIT" value="Submit Query"> </td></tr> </table> </form> <!--#var standard_html_footer--> <!--#var standard_html_header--> <!--#in Catalog size=50 start=query_start--> <!--#if sequence-start--> <!--#if previous-sequence--> <a href="<!--#var URL--><!--#var sequence-query -->query_start=<!--#var previous-sequence-start-number-->"> (Previous <!--#var previous-sequence-size--> results) </a> <!--#/if previous-sequence--> <table border> <tr> <th>Title</th> <th>Id</th> <th>Meta type</th> <th>Link</th> <th>Bobobase modification time</th> </tr> <!--#/if sequence-start--> <tr> <td><!--#var title--></td> <td><!--#var id--></td> <td><!--#var meta_type--></td> <td><a href="<!--#var SCRIPT_NAME-->/<!--#var "getpath(data_record_id_)"-->"><!--#var SCRIPT_NAME-->/<!--#var "getpath(data_record_id_)"--></a></td> <td><!--#var bobobase_modification_time--></td> </tr> <!--#if sequence-end--> </table> <!--#if next-sequence--> <a href="<!--#var URL--><!--#var sequence-query -->query_start=<!--#var next-sequence-start-number-->"> (Next <!--#var next-sequence-size--> results) </a> <!--#/if next-sequence--> <!--#/if sequence-end--> <!--#else--> There was no data matching this <!--#var title_or_id--> query. <!--#/in--> <!--#var standard_html_footer-->
-->
Is there another way of getting the url of the object you want for a link?
All my best,
Jason Spisak webmaster@mtear.com
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://www.zope.org/mailman/listinfo/zope-dev
(To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce
For non-developer, user-level issues, zope@zope.org, http://www.zope.org/mailman/listinfo/zope )
participants (2)
-
Jason Spisak -
Michel Pelletier