Problem with security. Request for authentication pops up unexpectedly
Hi There, I created a product. One of its baseclasses is ObjectManager. When I add a file "into" an instance of the product and try to download it an authentication screen pops up and asks for name and password. If I click cancel I can download the file without problem. What could be the reason of this behavior? thanks Robert
Hi, all! I also posted this to the ZopeNewbies.net discussion board before I realized there was a mailing list. Sorry for the repeat. What I'm trying to do is to create a web page that is comprised of sections (Folders) and section contents (DTML Documents inside the folders). So, for example, if these are my folders: * Chapter 1 * Chapter 2 Then I would like the DTML Documents contained IN those folders to be displayed. So, I made an index_html method in the Chapter 1 folder that's something like this: <dtml-var standard_html_header> <ul> <dtml-in "objectValues(['Folder'])"> <li><dtml-var title></li> </dtml-in> </ul> <dtml-var standard_html_footer> That works for giving me the TITLE of those documents, and there are plenty of examples of that in the Zope documentation. But I want to include the WHOLE document - something like this: <dtml-var standard_html_header> <dtml-in "objectValues(['Folder'])"> <h2><dtml-var title></h2> <dtml-var "theCurrentDocument()"> </dtml-in>< <dtml-var standard_html_footer> So you can see I'm trying to get at what is probably the very simple $_ item (in perl parlance). Is there a method for the current document in the dtml-in loop that will render itself? Thanks so much for any help! Andy
Welcome to the list Andy! Your code seems to return only Folder objects - are you saying that you would like to return the DTML Documents (either in their totality or just their titles - you need another dtml-in statement inside the folder in statement. I put in the dtml-let statement (it makes life easier than trying to use sequence-item! as you will learn!) and then iterate over your documents. If you want the title of the document then use the title property, or if you want to render the whole document then use the sequence-item tag. <dtml-var standard_html_header> <ul> <dtml-in "objectValues(['Folder'])"> <li><dtml-var title></li> <dtml-let item=sequence-item> <dtml-in "objectValues(['DTML Document'])"> Document Title:<dtml-var title><br> or Document Contents:<dtml-var sequence-item><br> </dtml-in> </dtml-let> </dtml-in> </ul> <dtml-var standard_html_footer> hth, Laurie <dtml-disclaimer> I kind-of tested it! </dtml-disclaimer> -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Andy Jewell Sent: Tuesday, September 25, 2001 11:23 AM To: zope@zope.org Subject: [Zope] NewbieQ: Rendering DTML Documents Hi, all! I also posted this to the ZopeNewbies.net discussion board before I realized there was a mailing list. Sorry for the repeat. What I'm trying to do is to create a web page that is comprised of sections (Folders) and section contents (DTML Documents inside the folders). So, for example, if these are my folders: * Chapter 1 * Chapter 2 Then I would like the DTML Documents contained IN those folders to be displayed. So, I made an index_html method in the Chapter 1 folder that's something like this: <dtml-var standard_html_header> <ul> <dtml-in "objectValues(['Folder'])"> <li><dtml-var title></li> </dtml-in> </ul> <dtml-var standard_html_footer> That works for giving me the TITLE of those documents, and there are plenty of examples of that in the Zope documentation. But I want to include the WHOLE document - something like this: <dtml-var standard_html_header> <dtml-in "objectValues(['Folder'])"> <h2><dtml-var title></h2> <dtml-var "theCurrentDocument()"> </dtml-in>< <dtml-var standard_html_footer> So you can see I'm trying to get at what is probably the very simple $_ item (in perl parlance). Is there a method for the current document in the dtml-in loop that will render itself? Thanks so much for any help! Andy _______________________________________________ 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 )
Thanks, Laurie! That was it exactly! Sheez, I was pulling my hair out because I knew it was probably an easy one. I'm still not 100% sure of what's going on with that LET tag, but it's working and now I have something to read up on specifically. Thanks again! Andy Laurie Nason wrote:
Welcome to the list Andy!
Your code seems to return only Folder objects - are you saying that you would like to return the DTML Documents (either in their totality or just their titles - you need another dtml-in statement inside the folder in statement. I put in the dtml-let statement (it makes life easier than trying to use sequence-item! as you will learn!) and then iterate over your documents. If you want the title of the document then use the title property, or if you want to render the whole document then use the sequence-item tag.
<dtml-var standard_html_header> <ul> <dtml-in "objectValues(['Folder'])"> <li><dtml-var title></li> <dtml-let item=sequence-item> <dtml-in "objectValues(['DTML Document'])"> Document Title:<dtml-var title><br> or Document Contents:<dtml-var sequence-item><br> </dtml-in> </dtml-let> </dtml-in> </ul> <dtml-var standard_html_footer>
hth,
Laurie <dtml-disclaimer> I kind-of tested it! </dtml-disclaimer>
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Andy Jewell Sent: Tuesday, September 25, 2001 11:23 AM To: zope@zope.org Subject: [Zope] NewbieQ: Rendering DTML Documents
Hi, all! I also posted this to the ZopeNewbies.net discussion board before I realized there was a mailing list. Sorry for the repeat.
What I'm trying to do is to create a web page that is comprised of sections (Folders) and section contents (DTML Documents inside the folders). So, for example, if these are my folders:
* Chapter 1 * Chapter 2
Then I would like the DTML Documents contained IN those folders to be displayed. So, I made an index_html method in the Chapter 1 folder that's something like this:
<dtml-var standard_html_header> <ul> <dtml-in "objectValues(['Folder'])"> <li><dtml-var title></li> </dtml-in> </ul> <dtml-var standard_html_footer>
That works for giving me the TITLE of those documents, and there are plenty of examples of that in the Zope documentation. But I want to include the WHOLE document - something like this:
<dtml-var standard_html_header> <dtml-in "objectValues(['Folder'])"> <h2><dtml-var title></h2> <dtml-var "theCurrentDocument()"> </dtml-in><
<dtml-var standard_html_footer>
So you can see I'm trying to get at what is probably the very simple $_ item (in perl parlance). Is there a method for the current document in the dtml-in loop that will render itself? Thanks so much for any help!
Andy
participants (3)
-
Andy Jewell -
Laurie Nason -
Robert Rottermann