[Zope-dev] getpath not working
Michel Pelletier
michel@digicool.com
Wed, 21 Jul 1999 00:15:41 -0400
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 )