[英]How to configure profiles directory in main configure.zcml to create a own viewlet
I am trying to create a own viewlet to change the default plone site using viewlet.I created viewlets.xml file under profiles/default directory.In the viewlets.xml file contains the code to hide the default plone logo.I registered profiles directory in main configure.zcml file like this我正在尝试创建一个自己的 viewlet 来使用 viewlet 更改默认的 plone 站点。我在配置文件/默认目录下创建了 viewlets.xml 文件。在 viewlets.xml 文件中包含隐藏默认 plone 徽标的代码。我在中注册了配置文件目录像这样的主 configure.zcml 文件
configure.zcml配置文件
<plone:static directory="profiles" type="theme"/>
<include package=".profiles" />
But while creating instance am getting error like this IOError: [Errno 2] No such file or directory: '/home/oomsys/brundelre3/src/bdr.theme/src/bdr/theme/profiles/configure.zcml'但是在创建实例时出现这样的错误 IOError: [Errno 2] No such file or directory: '/home/oomsys/brundelre3/src/bdr.theme/src/bdr/theme/profiles/configure.zcml'
pls anyone help me.. still im in struck请任何人帮助我..我仍然受到打击
You do not need to register the profiles
directory.您不需要注册profiles
目录。 It's automatically picked up by Generic Setup .它由Generic Setup自动选取。
EDIT编辑
You do have to register the profiles
directory but with a ZCML stanza like this:你必须注册profiles
目录,但与ZCML节是这样的:
<configure
xmlns="http://namespaces.zope.org/zope">
<includeDependencies package="." />
<genericsetup:registerProfile
name="default"
title="PACKAGE.DOTTED.NAME"
directory="profiles/default"
description="DESCRIPTION"
provides="Products.GenericSetup.interfaces.EXTENSION"
/>
</configure>
Once you install your package it will automatically run all the xml files within profiles/defualt
.一旦你安装了你的包,它会自动运行profiles/defualt
所有 xml 文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.