[Zope] url object?
J. Cameron Cooper
jccooper at jcameroncooper.com
Wed Oct 8 13:38:09 EDT 2003
>how can I hardwire a link to a folder or a file in Zope? I'm trying to
>create a navbar method (?) and include it on all pages on different levels
>of the site. The relative location of the link of course would be changing
>throughout the site ... but I'd like Zope to do the work here ...
>
>Tried it like this <a href:"<dtml-var myfolder>"> myfolder</a> but it did
>not work ...
>
>
Objects have an absolute_url method that will give their full URL.
<dtml-var "someobject.absolute_url()">
or
<dtml-with someobject><dtml-var absolute_url></dtml-with>
or (better)
<a href="" tal:attributes="href context/someobject/absolute_url">link
text</a>
or (Python script)
here.someobject.absolute_url()
--jcc
--
"My point and period will be throughly wrought,
Or well or ill, as this day's battle's fought."
More information about the Zope
mailing list