Hi, Im trying to access a property of a DTML document which calls about 3 DTML methods. I cant seem to get access to the original document though. Ive tried combinations of URL0, im obviously missing something obvious. Can anyone help? Thanks in advance. Andy and Danae McKay Email: dna@agmweb.bc.ca Web: www.agmweb.bc.ca Icq: 37397945 Phone: (604) 990-6762
Got it.. I knew it was something obvious... aq_parent... ----- Original Message ----- From: Andy <andy@agmweb.bc.ca> To: <zope@zope.org> Sent: Sunday, May 14, 2000 12:20 PM Subject: [Zope] Newbie: URL0
Hi,
Im trying to access a property of a DTML document which calls about 3 DTML methods. I cant seem to get access to the original document though. Ive tried combinations of URL0, im obviously missing something obvious. Can anyone help?
Thanks in advance.
Andy and Danae McKay Email: dna@agmweb.bc.ca Web: www.agmweb.bc.ca Icq: 37397945
Phone: (604) 990-6762
_______________________________________________ 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 )
Darn I thought that worked, when it didnt. For example: /folderx/foldery/blob_html.... all I get is the foldery, not blob_html. grrr. ----- Original Message ----- From: Andy <andy@agmweb.bc.ca> To: <zope@zope.org> Sent: Sunday, May 14, 2000 12:52 PM Subject: Re: [Zope] Newbie: URL0
Got it.. I knew it was something obvious... aq_parent...
----- Original Message ----- From: Andy <andy@agmweb.bc.ca> To: <zope@zope.org> Sent: Sunday, May 14, 2000 12:20 PM Subject: [Zope] Newbie: URL0
Hi,
Im trying to access a property of a DTML document which calls about 3 DTML methods. I cant seem to get access to the original document though. Ive tried combinations of URL0, im obviously missing something obvious. Can anyone help?
Thanks in advance.
Andy and Danae McKay Email: dna@agmweb.bc.ca Web: www.agmweb.bc.ca Icq: 37397945
Phone: (604) 990-6762
_______________________________________________ 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 )
_______________________________________________ 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 )
Ive resulted to: <dtml-with "REQUEST.resolve_url(URL0)"> <dtml-var id> </dtml-with> But there must be a more efficient method. ----- Original Message ----- From: Andy <andy@agmweb.bc.ca> To: <zope@zope.org> Sent: Sunday, May 14, 2000 1:36 PM Subject: Re: [Zope] Newbie: URL0
Darn I thought that worked, when it didnt. For example: /folderx/foldery/blob_html.... all I get is the foldery, not blob_html.
grrr. ----- Original Message ----- From: Andy <andy@agmweb.bc.ca> To: <zope@zope.org> Sent: Sunday, May 14, 2000 12:52 PM Subject: Re: [Zope] Newbie: URL0
Got it.. I knew it was something obvious... aq_parent...
----- Original Message ----- From: Andy <andy@agmweb.bc.ca> To: <zope@zope.org> Sent: Sunday, May 14, 2000 12:20 PM Subject: [Zope] Newbie: URL0
Hi,
Im trying to access a property of a DTML document which calls about 3 DTML methods. I cant seem to get access to the original document though. Ive tried combinations of URL0, im obviously missing something obvious. Can anyone help?
Thanks in advance.
Andy and Danae McKay Email: dna@agmweb.bc.ca Web: www.agmweb.bc.ca Icq: 37397945
Phone: (604) 990-6762
_______________________________________________ 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 )
_______________________________________________ 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 )
_______________________________________________ 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 )
Andy writes:
Ive resulted to:
<dtml-with "REQUEST.resolve_url(URL0)"> <dtml-var id> </dtml-with>
DTML Methods aquire the attributes of their parent folders. If you use a DTMLDocument then you can just do <dtml-var id> and you'll get the Document's id. Hope that helps,
But there must be a more efficient method.
----- Original Message ----- From: Andy <andy@agmweb.bc.ca> To: <zope@zope.org> Sent: Sunday, May 14, 2000 1:36 PM Subject: Re: [Zope] Newbie: URL0
Darn I thought that worked, when it didnt. For example: /folderx/foldery/blob_html.... all I get is the foldery, not blob_html.
grrr. ----- Original Message ----- From: Andy <andy@agmweb.bc.ca> To: <zope@zope.org> Sent: Sunday, May 14, 2000 12:52 PM Subject: Re: [Zope] Newbie: URL0
Got it.. I knew it was something obvious... aq_parent...
----- Original Message ----- From: Andy <andy@agmweb.bc.ca> To: <zope@zope.org> Sent: Sunday, May 14, 2000 12:20 PM Subject: [Zope] Newbie: URL0
Hi,
Im trying to access a property of a DTML document which calls about 3 DTML methods. I cant seem to get access to the original document though. Ive tried combinations of URL0, im obviously missing something obvious. Can anyone help?
Thanks in advance.
Andy and Danae McKay Email: dna@agmweb.bc.ca Web: www.agmweb.bc.ca Icq: 37397945
Phone: (604) 990-6762
_______________________________________________ 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 )
_______________________________________________ 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 )
_______________________________________________ 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 )
_______________________________________________ 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 )
Jason Spisak CIO HireTechs.com 6151 West Century Boulevard Suite 900 Los Angeles, CA 90045 P. 310.665.3444 F. 310.665.3544 Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email address may not be added to any commercial mail list with out my permission. Violation of my privacy with advertising or SPAM will result in a suit for a MINIMUM of $500 damages/incident, $1500 for repeats.
Andy, While I'm not sure I completely understand the problem, this explanation might be worth something. Try setting up two objects: a DTML Method and a DTML Document. In both, put the following code: <dtml-var "this().title_or_id()"> In the DTML Method, you will get back the title or ID of the parent folder. In the DTML Document, you will get back the title or ID of the DTML Document it was called from. The "this()" call refers to the acquired "self" of the method or document. In the case of a method, "self" is the method's acquired 'innermost' container. Most of the time. :-) In the case of a DTML document, "self" is the document itself. You may want to also give a shot at the resolve_url method of the REQUEST object. It gives you back the object that is referred to by the URL you pass in: <dtml-let a="REQUEST.resolve_url('/foldera/folderb')"> <dtml-var "a.title_or_id()"> </dtml-let> You may be able to do something with this in cooperation with URLx (which you can pass into resolve_url). Bindings are somewhat hard to understand and explain in concert with acquisition. That's sort of an unabashed cop out at this point, as it takes a while for almost everybody (even Jim sometimes :-) to unravel what is getting bound where in any specific method call. There is a method to the madness, but it's hard to figure out. Maybe you can post a more detailed description of the problem and somebody can help you a little more. Andy wrote:
Darn I thought that worked, when it didnt. For example: /folderx/foldery/blob_html.... all I get is the foldery, not blob_html.
grrr. ----- Original Message ----- From: Andy <andy@agmweb.bc.ca> To: <zope@zope.org> Sent: Sunday, May 14, 2000 12:52 PM Subject: Re: [Zope] Newbie: URL0
Got it.. I knew it was something obvious... aq_parent...
----- Original Message ----- From: Andy <andy@agmweb.bc.ca> To: <zope@zope.org> Sent: Sunday, May 14, 2000 12:20 PM Subject: [Zope] Newbie: URL0
Hi,
Im trying to access a property of a DTML document which calls about 3 DTML methods. I cant seem to get access to the original document though. Ive tried combinations of URL0, im obviously missing something obvious. Can anyone help?
-- Chris McDonough Digital Creations Publishers of Zope - http://www.zope.org
Andy wrote:
Darn I thought that worked, when it didnt. For example: /folderx/foldery/blob_html.... all I get is the foldery, not blob_html.
grrr.
Andy, I'm not entirely sure what you're trying to do. However, this may help: 1: Create a new DTML method somewhere 2: Delete the default text of the method 3: Put just the following in instead: <dtml-var REQUEST> 4: Point your browser at the new DTML method's URL This will give you a list of all the values in the REQUEST object. Hopefully you'll find one there that is useful to you. -- Steve Alexander Software Engineer Cat-Box limited
DTML Document: index_html <dtml-with methods> <dtml-var top_nav_bar> </dtml-with> blah.... DTML Method: top_nav_bar <dtml-var top_nav_thingy> blah.... DTML Method: top_nav_thingy Here I want to get the original DTML Document title. <dtml-with "REQUEST.resolve_url(URL0)"> <dtml-var title> </dtml-with> Thanks guys for all your help!. ----- Original Message ----- From: Steve Alexander <steve@cat-box.net> To: Andy <andy@agmweb.bc.ca> Cc: <zope@zope.org> Sent: Sunday, May 14, 2000 2:31 PM Subject: Re: [Zope] Newbie: URL0
Andy wrote:
Darn I thought that worked, when it didnt. For example: /folderx/foldery/blob_html.... all I get is the foldery, not blob_html.
grrr.
Andy,
I'm not entirely sure what you're trying to do. However, this may help:
1: Create a new DTML method somewhere 2: Delete the default text of the method 3: Put just the following in instead:
<dtml-var REQUEST>
4: Point your browser at the new DTML method's URL
This will give you a list of all the values in the REQUEST object. Hopefully you'll find one there that is useful to you.
-- Steve Alexander Software Engineer Cat-Box limited
_______________________________________________ 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)
-
Andy -
Chris McDonough -
Jason Spisak -
Steve Alexander