Plone-覆盖另一产品的skins.xml [英] Plone - Overriding skins.xml of another product

查看:127
本文介绍了Plone-覆盖另一产品的skins.xml的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用Plone时,我需要使用图像映射.因此,我在产品中添加了产品.但是,我指出我无法在应用程序中使用该产品.经过调查,我注意到该特定产品指定了要使用的特定主题,即plone默认主题.

In using Plone, I had the need to use image maps. So I added this product to my build. However, I noted that I was not able to use the product in my application. After investigation, I noticed that this particular product had specified specific themes to be used i.e. the plone default themes.

这是产品中的skins.xml:

Here is the skins.xml from the product:

<?xml version="1.0"?>
<object name="portal_skins" allow_any="False" cookie_persistence="False">

 <object name="zopyx_tinymceplugins_imgmap"
    meta_type="Filesystem Directory View"
    directory="zopyx.tinymceplugins.imgmap:skins/zopyx_tinymceplugins_imgmap"/>

 <skin-path name="Plone Default">
  <layer name="zopyx_tinymceplugins_imgmap"
     insert-after="custom"/>
 </skin-path>
 <skin-path name="Sunburst Theme">
  <layer name="zopyx_tinymceplugins_imgmap"
     insert-after="custom"/>
 </skin-path>

</object>

现在我的应用程序具有特定主题,即MyCustomTheme.激活它后,我将无法使用附加产品的功能,但是当我恢复为Plone默认主题时,它可以正常运行.我是从该特定产品中主题的硬编码得出的.

Now my application has a specific theme i.e. MyCustomTheme. When I activate it, I am unable to use the features of the addon product, but when I revert to the Plone default theme, it works OK. This I deduce is from the hardcoding of the themes within that particular product.

如何解决此问题,以确保MyCustomTheme将始终能够使用该产品?我正在考虑编辑skins.xml文件,并将该产品作为依赖项包括在内.

How can I fix this to ensure that MyCustomTheme will always be able to use the product? I am thinking of editing my skins.xml file and include the product as a dependency.

更新:该产品的作者终于修复了该错误.从0.3.2开始,该产品的最新版本现在对所有皮肤都可以正常工作.

UPDATE: The authors of the product have finally fixed the bug. The latest version of the product from 0.3.2 should now work OK for all skins.

推荐答案

您还需要将同一层(zopyx_tinymceplugins_imgmap)添加到您自己的主题中;它不依赖于默认外观,但是作者忘记添加通配符定义以将图层注册到 all 外观.

You need to add the same layer (zopyx_tinymceplugins_imgmap) to your own theme too; it is not dependent on the Default skin, but the author forgot to add a wild-card definition to register the layer with all skins.

如果您已经拥有自己主题的skins.xml文件,只需向其添加相同的图层定义:

If you already have a skins.xml file for your own theme, simply add the same layer definition to it:

 <skin-path name="Your Theme Name">
  <layer name="zopyx_tinymceplugins_imgmap"
     insert-after="custom"/>
  <!-- your other skin layer definitions -->
 </skin-path>

确保将本产品的通用设置配置文件添加到您自己的配置文件的medadata.xml依赖项中:

Make sure you add this product's generic setup profile to your own profile's medadata.xml dependencies:

<dependencies>
    <dependency>profile-zopyx.tinymceplugins.imgmap:default</dependency>
    <!-- any other dependencies -->

</dependencies>

然后再次运行您的设置配置文件.

and run your setup profile again.

这篇关于Plone-覆盖另一产品的skins.xml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆