On 2013-01-30 15:17:19 +0000, Mike Cullerton said:

Hi,

I'm not sure about zcml, but here's a way to get it in a python file. Maybe you can adapt the idea.

This gets you the buildout directory. From there, you can build the path to anything you need. ie, home_directory/bin/zeoserver

# in buildout
zope-conf-additional =
    <product-config local_conf>
        homedir ${buildout:directory}
    </product-config>

# in some python file
from App.config import getConfiguration
config = getConfiguration()
configuration = config.product_config.get('local_conf', dict())
home_directory = configuration.get('homedir')


Right, is this question about ZCML or Buildout or Python? Somewhere you need to dynamically obtain the path e.g. os.path.dirname(__file__) in "pure" Python.



Hope this helps,
Mike

On Jan 30, 2013, at 7:48 AM, Jochen Dekeyser <[email protected]> wrote:

Hi,

Is it possible to specify the instance home directory of zope/plone e.g.
'/path/to/plone/zeoserver' in a zcml configuration-file, without knowing the
absolute path (before install). E.g. it could be
/home/plone/zope1/zeoserver, /home/plone/zope2/zeoserver...

In detail: I am setting up an add-on which extends collective.dancing: in my
zcml-file, I would like to put:
<mail:queuedDelivery ...
queuePath=&quot;/path/to/plone/zeoserver/var/mailqueue&quot;  ... />
but I don't know where zope will be installed...

Jochen



--
View this message in context: http://plone.293351.n2.nabble.com/Specify-instance-home-directory-in-zcml-as-parameter-tp7562842.html
Sent from the Product Developers mailing list archive at Nabble.com.
_______________________________________________
Product-Developers mailing list
[email protected]
https://lists.plone.org/mailman/listinfo/plone-product-developers


--
Alex Clark ยท https://www.gittip.com/aclark4life/


_______________________________________________
Product-Developers mailing list
[email protected]
https://lists.plone.org/mailman/listinfo/plone-product-developers

Reply via email to