API Documentation

URL tool interface.

$Id: portal_url.py,v 1.4.10.2 2004/04/23 21:11:34 sidnei Exp $


class portal_url

CMF URL Tool interface.

This interface provides a common mechanism for finding the root object of a CMFSite, and for computing paths to objects relative to that root.


id = Must be set to "portal_url"

Methods

getRelativeContentPath(content):

Get the path for an object, relative to the portal root.

Permission
Always available
Returns
Tuple of IDs

getRelativeContentURL(content):

Get the URL for an object, relative to the portal root.

This is helpful for virtual hosting situations. Same method as getRelativeURL()

Permission
Always available
Returns
Slash-separated string

getPortalPath():

Get the portal object's URL without the server URL component.

Permission
Always available
Returns
Slash-separated string

getPortalObject():

Get the portal object itself.

Permission
Always available
Returns
CMFSite object

__call__(relative=0, *args, **kw):

Get by default the absolute URL of the portal.

Permission
Always available
Returns
Slash-separated string

getRelativeUrl(content):

Get the URL for an object, relative to the portal root.

This is helpful for virtual hosting situations. Same method as getRelativeContentURL()

Permission
Always available
Returns
Slash-separated string