Re: Zope problem: objectValues('Folder')

Discussion in 'Python' started by Max M, Jul 10, 2003.

  1. Max M

    Max M Guest

    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
    Max M, Jul 10, 2003
    #1
    1. Advertising

  2. Max M

    Jens Riedel Guest

    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
    Jens Riedel, Jul 10, 2003
    #2
    1. Advertising

  3. Max M

    Max M Guest

    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
    Max M, Jul 10, 2003
    #3
  4. Max M

    Jens Riedel Guest

    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
    Jens Riedel, Jul 10, 2003
    #4
  5. Max M

    Max M Guest

    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
    Max M, Jul 10, 2003
    #5
  6. Max M

    Jens Riedel Guest

    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
    Jens Riedel, Jul 10, 2003
    #6
  7. Max M

    Lee Harr Guest

    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.
    Lee Harr, Jul 11, 2003
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. William LaMartin

    _vti_cnf folder in the bin folder-- a problem?

    William LaMartin, Nov 10, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    1,676
    Oliver
    Nov 10, 2003
  2. Craig Funk
    Replies:
    1
    Views:
    428
    Jens Riedel
    Jul 11, 2003
  3. Shane Hathaway
    Replies:
    2
    Views:
    315
    Michael Hudson
    Aug 29, 2003
  4. Lukasz Indyk
    Replies:
    2
    Views:
    284
    Ng Pheng Siong
    Apr 8, 2004
  5. madhu
    Replies:
    0
    Views:
    398
    madhu
    Oct 5, 2006
Loading...

Share This Page