How about (sort of tested):

<dtml-call "REQUEST.set('newurl',_.string.split(your_url,BASE0)[1])">
<dtml-try>
  <dtml-var "restrictedTraverse(newurl)">
<dtml-except>
  <dtml-comment>ignore the error or otherwise report it</dtml-comment>
</dtml-try>

hth

Phil
----- Original Message -----
From: "Jens Grewen" <[EMAIL PROTECTED]>
To: "kosh" <[EMAIL PROTECTED]>
Cc: "Zope Maillist" <[EMAIL PROTECTED]>
Sent: Wednesday, October 25, 2000 2:14 AM
Subject: Re: [Zope] <dtml-if url type contruct>


| Hi,
|
| I am not quite sure if this is what you want but may this helps
|
| <dtml-with bar>
|   <dtml-if "REQUEST.has_key('foo')">
|      do something
|   </dtml-if>
| </dtml-with>
|
| This is not resolving the URL.
| If you found a solution let me know.
|
| Jens Grewen
|
|
| ----- Original Message -----
| From: "kosh" <[EMAIL PROTECTED]>
| To: <[EMAIL PROTECTED]>
| Sent: Tuesday, October 24, 2000 10:56 PM
| Subject: [Zope] <dtml-if url type contruct>
|
|
| > What would be the correct dtml-if contrstruct for this behavior?
| >
| > I want to check and see if zope can resolve a url to a valid object.
| >
| > Ie does http://foo.com/bar/foo get you to a valid page or is it not
| > found.
| >
| > I need something like <dtml-if http://foo.com/bar/foo> that way I can
know
| > when to rewrite the url based on zope finding the object or not.
| >
| > Thanks
| > Kosh
| >
| >
| > _______________________________________________
| > Zope maillist  -  [EMAIL PROTECTED]
| > http://lists.zope.org/mailman/listinfo/zope
| > **   No cross posts or HTML encoding!  **
| > (Related lists -
| >  http://lists.zope.org/mailman/listinfo/zope-announce
| >  http://lists.zope.org/mailman/listinfo/zope-dev )
| >
|
|
| _______________________________________________
| Zope maillist  -  [EMAIL PROTECTED]
| http://lists.zope.org/mailman/listinfo/zope
| **   No cross posts or HTML encoding!  **
| (Related lists -
|  http://lists.zope.org/mailman/listinfo/zope-announce
|  http://lists.zope.org/mailman/listinfo/zope-dev )


_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to