[Zope-CMF] Title() and page reloading - improved question :)

Pawel Lewicki lewicki@provider.pl
Mon, 19 Aug 2002 12:01:29 +0200


> >         for dok in
folder[1].contentItems(filter={'portal_type':'MyType'}):
> >             if dok[1].Title():print " &#9642; <a
> > href="+str(dok[1].absolute_url())+">"+str(dok[1].Title())+"</a><br>"
> >             else:print " &#9642; <a
> > href="+str(dok[1].absolute_url())+">"+str(dok[0])+"</a><br>"
>
> This code is totally impenetrable, you'll have to rephrase you question
simply
> if you want help :-S
>
> Chris
>

Sorry :)
This is the script  :

localFolder=context.portal_membership.getHomeFolder()
for folder in localFolder.contentItems(filter={'portal_type':'Folder'}):
    print "<h4>"+str(folder[1]['title'])+"</h4>"
    for dok in folder[1].contentItems(filter={'portal_type':'Document'}):
        print dok[1].Title()
                 ----------------
return printed

This is the script with names of the documents (originally there were links
but it's not a point). A few weeks ago I made it working but it unexpectenly
stopped. The page is continuosly reloading. When I replace the underlined
code with 'print dok[0]' everything works fine but not like I want to. The
funny thing is that the same code sometimes works - I don't know why.
Everything is fine also when I log into CMF site despite the fact that the
logged user has the same skin as default for anonymous users.

Pawel