[Zope-CMF] CMF portal_catalog(path) and VirtualHostMonster

Ronald L. Roeber rroeber1@unl.edu
Tue, 4 Mar 2003 11:43:26 -0600


Mark,

Thanks for pointing me in the right direction. Here is how I addressed the 
problem.

In the main_template Page Template, I added the following definition in 
<html tal:define="...
  ...
  portal_path python: 
modules['string'].join(portal_object.getPhysicalPath(), '/');
  ...

I then used 'portal_path' to construct the catalog queries:
  ...
  , path='%s/pubs' % portal_path
  ...

Works with and/or without the VH. The suggestion saved me hours of work. 
Not for everyone, and there may be some unforeseen down sides, but it 
works well so far.

Thanks so much!
Ron Roeber

"Mark McEahern" <marklists@mceahern.com> wrote on 02/25/2003 06:43:29 PM:

> [Ronald L. Roeber]
> > <div tal:define=docs python:here.portal_catalog(meta_type='Document'
> >                                                ,sort_on = 'Date'
> >                                                ,sort_order='reverse'
> > ,review_state='pulished'
> >                                                ,path='/%s/pubs' % 
> > here.portal_url(1);>
> 
> I wonder if you try something like this (semi-pseudocode):
> 
> portal_root = nocall:here/portal_url/getPortalObject/getPhysicalPath
> path = '%s/pubs' % portal_root