I want to be able to take a URL and read the properties of that object: You can't do it directly in a WITH tag Example: <!--#with "http://domain/my/object"--> but it seems like the whole premise of Zope is translating URLs into Objects, is there a routine that can be used in DTML to translate the URL to an object reference? Example: <!--#with " ObjectFromURL( 'http://domain/my/object' ) "--> <!--#var id --><br> <!--#/with--> Thanks! kh
At 04:40 PM 4/22/00 -0300, Kevin Howe wrote:
I want to be able to take a URL and read the properties of that object:
You can't do it directly in a WITH tag
Example: <!--#with "http://domain/my/object"-->
You almost got it: <dtml-with "my.object"> blah </dtml-with> PS: I would strongly suggest you use the new syntax, since the old syntax may not be supported for much longer. Also, I think the new one looks much nicer, and the SGML-MODE in Emacs works too. :) Regards, Stephan -- Stephan Richter - (901) 573-3308 - srichter@cbu.edu CBU - Physics & Chemistry; Framework Web - Web Design & Development PGP Key: 735E C61E 5C64 F430 4F9C 798E DCA2 07E3 E42B 5391
Geez, a while back we had a question about this from somebody else which Evan Simpson solved (before he worked for DC, back when he was a lounge singer). You may want to search the mail archives for messages between me, Evan Simpson, and errrrr.... somebody else... wait here it is... Date: Mon, 6 Dec 1999 09:45:24 -0600 From: Evan Simpson evan@tokenexchange.com Subject: [Zope] String to object ID Look at that whole thread. Then read about _.string.split (ie. Python's 'string.split' function). You may want to rethink your way of doing this, however. Are you sure you need to use a URL-style string to reference the object? On Sat, 22 Apr 2000, Kevin Howe wrote:
I want to be able to take a URL and read the properties of that object:
You can't do it directly in a WITH tag
Example: <!--#with "http://domain/my/object"-->
but it seems like the whole premise of Zope is translating URLs into Objects, is there a routine that can be used in DTML to translate the URL to an object reference?
Example: <!--#with " ObjectFromURL( 'http://domain/my/object' ) "--> <!--#var id --><br> <!--#/with-->
Thanks! kh
_______________________________________________ Zope maillist - Zope@zope.org 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 )
----- Original Message ----- From: "Kevin Howe" <khowe@performance-net.com> To: "ZOPE Mailing List" <zope@zope.org> Sent: Saturday, April 22, 2000 3:40 PM Subject: [Zope] get an object based on URL???
but it seems like the whole premise of Zope is translating URLs into Objects, is there a routine that can be used in DTML to translate the URL to an object reference?
Example: <!--#with " ObjectFromURL( 'http://domain/my/object' ) "--> <!--#var id --><br> <!--#/with-->
<dtml-with "REQUEST.resolve_url('http://domain/my/object')"> <dtml-var id> </dtml-with> Kevin
Damn, I knew somebody was going to make it that easy. Nevermind what I said, go do that :-) On Sat, 22 Apr 2000, Kevin Dangoor wrote:
----- Original Message ----- From: "Kevin Howe" <khowe@performance-net.com> To: "ZOPE Mailing List" <zope@zope.org> Sent: Saturday, April 22, 2000 3:40 PM Subject: [Zope] get an object based on URL???
but it seems like the whole premise of Zope is translating URLs into Objects, is there a routine that can be used in DTML to translate the URL to an object reference?
Example: <!--#with " ObjectFromURL( 'http://domain/my/object' ) "--> <!--#var id --><br> <!--#/with-->
<dtml-with "REQUEST.resolve_url('http://domain/my/object')"> <dtml-var id> </dtml-with>
Kevin
_______________________________________________ Zope maillist - Zope@zope.org 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 )
participants (4)
-
Chris McDonough -
Kevin Dangoor -
Kevin Howe -
Stephan Richter