Plone 如何在主configure.zcml中配置profiles目录以创建自己的viewlet

Plone 如何在主configure.zcml中配置profiles目录以创建自己的viewlet,plone,zcml,Plone,Zcml,我正在尝试创建自己的viewlet,以使用viewlet更改默认plone站点。我在profiles/default目录下创建了viewlets.xml文件。在viewlets.xml文件中,包含隐藏默认plone徽标的代码。我在主configure.zcml文件中注册了profiles目录,如下所示 configure.zcml <plone:static directory="profiles" type="theme"/> <include package=".pr

我正在尝试创建自己的viewlet,以使用viewlet更改默认plone站点。我在profiles/default目录下创建了viewlets.xml文件。在viewlets.xml文件中,包含隐藏默认plone徽标的代码。我在主configure.zcml文件中注册了profiles目录,如下所示

configure.zcml

<plone:static directory="profiles" type="theme"/> 


<include package=".profiles" /> 
但在创建实例时,我遇到了如下错误 IOError:[Errno 2]没有这样的文件或目录:'/home/oomsys/brunderre3/src/bdr.theme/src/bdr/theme/profiles/configure.zcml'


请任何人帮帮我。。但是我仍然在stroked

中,您不需要注册profiles目录。它是由计算机自动拾取的

编辑

您确实需要注册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>

安装软件包后,它将自动运行profiles/defalt中的所有xml文件。

profiles子目录中是否有configure.zcml文件?仅用于包含其他configure.zcml文件。你的意思是要注册一个通用的安装配置文件吗?是的,很抱歉,但他在问题中提出的不是注册为…我使用genericsetup:registerProfile like directory=profiles/default在主configure.zcml文件中注册了配置文件目录。。但是我无法调用profiles/default下的viewlet.xml文件。我不知道为什么…@OomsysPythonteam你不必叫它。安装产品后,将解析并执行viewlets.xml。