Liferay 主题无法启用?
我正在尝试启用自定义 liferay 主题。
主题位于 webapps/ROOT/html 中(目前基本上是 classic 的副本),我已经修改了 liferay-look-and-feel.xml 如下:
<theme id="mytheme" name="mytheme">
<root-path>/html/themes/cloudprint</root-path>
<templates-path>${root-path}/templates</templates-path>
<images-path>${root-path}/images</images-path>
<template-extension>vm</template-extension>
<roles>
<role-name>User</role-name>
</roles>
<color-scheme id="01" name="Blue">
<css-class>blue</css-class>
<color-scheme-images-path>${images-path}/color_schemes/${css-class}</color-scheme-images-path>
</color-scheme>
<color-scheme id="02" name="Green">
<css-class>green</css-class>
</color-scheme>
<color-scheme id="03" name="Orange">
<css-class>orange</css-class>
</color-scheme>
</theme>
在ROOT/WEB-INF/classes
中,我有portal-ext.properties
: default.theme.id=mytheme
我也尝试了 default.regular.theme.id
也没有效果。一切仍然使用经典
主题。
到底是怎么回事?
I'm trying to enable a custom liferay theme.
The theme is located in webapps/ROOT/html
(basically a copy of classic for now), and I've modified liferay-look-and-feel.xml
as such:
<theme id="mytheme" name="mytheme">
<root-path>/html/themes/cloudprint</root-path>
<templates-path>${root-path}/templates</templates-path>
<images-path>${root-path}/images</images-path>
<template-extension>vm</template-extension>
<roles>
<role-name>User</role-name>
</roles>
<color-scheme id="01" name="Blue">
<css-class>blue</css-class>
<color-scheme-images-path>${images-path}/color_schemes/${css-class}</color-scheme-images-path>
</color-scheme>
<color-scheme id="02" name="Green">
<css-class>green</css-class>
</color-scheme>
<color-scheme id="03" name="Orange">
<css-class>orange</css-class>
</color-scheme>
</theme>
In ROOT/WEB-INF/classes
, I have portal-ext.properties
:default.theme.id=mytheme
I also tried default.regular.theme.id
to no effect also. Everything still uses the classic
theme.
What the heck is going on?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
确保为主题设置了安全角色,否则将不会设置。
Make sure a security role is set for the theme, or else it will not be set.
即使您似乎已经自己找到了一些东西:官方支持的方法是使用插件 sdk。有了这个你可能就不会遇到这个问题了。强烈建议不要修改门户代码本身(考虑升级的维护工作),并且不支持 ext-plugin(或 5.2.x 的 ext-environment)中的主题。
话虽这么说,你也许能让他们工作,但你会让你的生活变得不必要的困难。
Even though you already seem to have found something yourself: The officially supported way is to use the plugins sdk. With this you probably wouldn't have had this problem. Modifying the portal code itself is strongly discouraged (think about the maintenance effort for upgrading) and themes in ext-plugin (or the ext-environment for 5.2.x) are not supported.
That being said, you might be able to get them to work, but you make your life harder than necessary.