[Zope-CMF] HELP-cannot publish folder as manager-HTTPResponse.py
Tres Seaver
tseaver@zope.com
18 Sep 2002 09:51:35 -0400
On Tue, 2002-09-17 at 18:20, Florent Guillaume wrote:
> Hmmm I thought I mentionned that somewhere in the past.
>
> '/view' has to be inserted for contentish types otherwise images and
> files (whose base url has the meaning "download") would not be treated
> correctly.
I have a workaround for this problem, which I will probably land on the
head RSN:
- Add a new (FS)PythonScript, 'search_suffix', which tests the
'portal_type' of its context and returns either '/view' (for Image,
File, etc.) or '' (the default).
- Add 'search_suffix' to the catalog's schema.
- Reindex the catalog.
- Modify the 'search' template to concatenate the absolute URL with
the value of the brain's 'search_suffix'.
Perhaps a better implementation would be to add a 'search_suffix'
property to the TypeInformation base class, and then have the method
return the property from its context's type.
> On Tue, 2002-09-17 at 22:49, Carl Rendell wrote:
> > A question for both of you and perhaps others. Is there any reason
> > why '/view' _has_ to be inserted into the redirect in
> > content_status_modify? I've removed it from my installations and
> > have not run into any issues. Since the view action is implied, I'm
> > not sure it is necessary.
> >
> > Also, you need to clean up search.pt to review '/view' as well:
> >
> > tal:define="global objURL python: results.getURL() + '/view'"
> >
> > If you want the links in search results to work properly for
> > SkinnableFolder-based types.
Tres.
--
===============================================================
Tres Seaver tseaver@zope.com
Zope Corporation "Zope Dealers" http://www.zope.com