Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: Zope problem: objectValues('Folder')

Reply
Thread Tools

Re: Zope problem: objectValues('Folder')

 
 
Max M
Guest
Posts: n/a
 
      07-10-2003
Jens Riedel wrote:

> I try to get a list of subfolders by using


> <ul>
> <dtml-in expr="objectValues('Folder')">
> <li><a href="&dtml-absolute_url;"><dtml-var title_or_id></a></li><br>
> </dtml-in>
> </ul>



If you have written it exactly like that, it should work. You have no
folders inside the folder you are running it in then.


> Does anybody know where the problem with "objectValues('Folder/File')" is?



I assume you have not written your code that way, but rather:

objectValues(['Folder','File'])


regards Max M

 
Reply With Quote
 
 
 
 
Jens Riedel
Guest
Posts: n/a
 
      07-10-2003
Max M schrieb:

>><ul>
>><dtml-in expr="objectValues('Folder')">
>><li><a href="&dtml-absolute_url;"><dtml-var title_or_id></a></li><br>
>></dtml-in>
>></ul>


> If you have written it exactly like that, it should work. You have no
> folders inside the folder you are running it in then.


That's my problem. I followed the instructions of the Zope Book example
exactly and created 3 folders in the folder I use the
objectValues()-method on.

In another example I have the folder "photos" with 3 jpg-files in it.
When I call "photos.objectValues()" I get a list with the 3 files, if I
use "photos.objectValues('File')" I get nothing...
The objectValues-method seems not working when I specify it on a type.


> I assume you have not written your code that way, but rather:
>
> objectValues(['Folder','File'])


Correct, I did write either objectValues('Folder') or
objectValues('File') in my code.

Greetings,
Jens

 
Reply With Quote
 
 
 
 
Max M
Guest
Posts: n/a
 
      07-10-2003
Jens Riedel wrote:

> Max M schrieb:
>
>>> <ul>
>>> <dtml-in expr="objectValues('Folder')">
>>> <li><a href="&dtml-absolute_url;"><dtml-var title_or_id></a></li><br>
>>> </dtml-in>
>>> </ul>

>
>
>> If you have written it exactly like that, it should work. You have no
>> folders inside the folder you are running it in then.

>
>
> That's my problem. I followed the instructions of the Zope Book example
> exactly and created 3 folders in the folder I use the
> objectValues()-method on.



hmmm ... it is not a zope problem. objectValues() works!

try

<ul>
<dtml-in objectValues>
<li>&dtml-meta_type;</li>
</dtml-in>
</ul>


That should give a hint.

regards Max M

 
Reply With Quote
 
Jens Riedel
Guest
Posts: n/a
 
      07-10-2003
The problem seems to be somewhere else:

I used the objectValues('Folder')-method in a DTML-method named
'navigation'. I include <dtml-var navigation> in a
'standard_html_header' DTML method, and this standard_html_header is
used in the index_html document.
All three are in the same folder which contains 3 Subfolders. If I view
'navigation' or 'standard_html_header' in the management area, I see the
3 folders, but in the index_html they don't appear. Everything else in
the standard_html_header, like stylesheets etc. are correctly shown so
I'm sure that the correct standard_html_header is included.

Jens

 
Reply With Quote
 
Max M
Guest
Posts: n/a
 
      07-10-2003
Jens Riedel wrote:

> I used the objectValues('Folder')-method in a DTML-method named
> 'navigation'. I include <dtml-var navigation> in a
> 'standard_html_header' DTML method, and this standard_html_header is
> used in the index_html document.



Navigation may be used for something else.


Does it work if you render only the navigation method?

Also, you will find it much easier to find replies to Zope questions on
the zope mailing list.

regards Max M

 
Reply With Quote
 
Jens Riedel
Guest
Posts: n/a
 
      07-10-2003
Max M schrieb:

>>I used the objectValues('Folder')-method in a DTML-method named
>>'navigation'. I include <dtml-var navigation> in a
>>'standard_html_header' DTML method, and this standard_html_header is
>>used in the index_html document.


> Does it work if you render only the navigation method?


Yes, that's what confuses me. The navigation works completely if I call
it with http://localhost:8080/ZopeZoo/navigation, also the
standard_html_header does. But when I include it in the index_html, the
list of folders vanishes, the rest of navigation works.


> Also, you will find it much easier to find replies to Zope questions on
> the zope mailing list.


thanx for the hint, I'll try it.

regards,
Jens



 
Reply With Quote
 
Lee Harr
Guest
Posts: n/a
 
      07-11-2003
In article <>, Jens Riedel wrote:
> The problem seems to be somewhere else:
>
> I used the objectValues('Folder')-method in a DTML-method named
> 'navigation'. I include <dtml-var navigation> in a
> 'standard_html_header' DTML method, and this standard_html_header is
> used in the index_html document.
> All three are in the same folder which contains 3 Subfolders. If I view
> 'navigation' or 'standard_html_header' in the management area, I see the
> 3 folders, but in the index_html they don't appear. Everything else in
> the standard_html_header, like stylesheets etc. are correctly shown so
> I'm sure that the correct standard_html_header is included.
>
> Jens
>



Is index_html a DTML_Document, maybe?

In that case, I think objectValues() would look in the index_html for
its objects, instead of the containing folder.

Try creating a new DTML_Method and putting your code in there.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: [Zope-dev] Zope 2.7 running with Stackless 3.0 Shane Hathaway Python 2 08-29-2003 09:59 AM
zope xml error Jinu Python 0 07-15-2003 10:08 AM
Re: Zope problem: objectValues('Folder') Craig Funk Python 1 07-11-2003 05:56 AM
doublequotes in regexp 1.5.2 - zope/externalmethod Florian Konnertz Python 1 07-08-2003 09:57 PM
eGenix mxODBC Zope DA for FreeBSD M.-A. Lemburg Python 0 07-01-2003 04:37 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57