[Zope] Display parent container title in Page Template (Solved)

hpinson at indepthl.com hpinson at indepthl.com
Mon Aug 18 16:04:33 EDT 2003


Yes-- that does the trick.  Thanks!.  I did not give enough 
information in the first post. Sorry about that

-- so here is what I ended up with for my search results output:

<div tal:repeat="result batch" >
<ul>
<li><p>
Title: <strong tal:define="obj 
python:here.getobject(result.data_record_id_)">
<span tal:content="obj/../title">title of parent of record 
returned</span>
</strong><br>
Link: <a href="#" tal:attributes="href 
python:here.goUp(result.getURL())" 
tal:content="python:here.goUp(result.getURL())">Item Title</a><br>   
</p></li>
</ul>
</div>

The goUp method is a python script that returns the parent container 
URL.

Parameters: orgin

Python Script: 

url = origin.split('/')[:-1]
return '/'.join(url)

Harlow Pinson
Indepth Learning
Email: hpinson at indepthl.com 
Web: http://www.indepthl.com
Voice: 505-994-2135
FAX: 208-475-7678




More information about the Zope mailing list