URL, portal and portal_url
by
Darrell Kingsley
—
last modified
Mar 13, 2014 12:54 PM
Getting the portal URL, or a reference to the portal in a python script is easy
To get a reference to the portal, and then the portal URL after that.
from Products.CMFCore.utils import getToolByName
urltool = getToolByName(context, 'portal_url')
portal = urltool.getPortalObject()
url = portal.absolute_url()
To get the portal URL on its own:
context.portal_url()
If you are in a hurry then you can call us on 01980 556432 and we'll see if we can help.

