0
votes

We have an issue with the theme we created for Liferay and to me it seems like we are doing something wrong, because it seems like a very stupid problem. We use Maven builds for all our plugins and therefore have a build artifact containing a version number. When we deploy the theme, it looks like Liferay creates an ID for the theme based on the theme name specified in the look and feel XML of the theme and the name of the .war file. It looks something like xxxx_WAR_yyyy, which is very confusing to me. When we deploy a new version of the theme, Liferay will create a different ID for it and thus all pages using the "old" theme, will not be updated to the new version.

There has to be some way to specify a unique ID for a theme that will never change, no matter what file the theme has been deployed as. The file name should not have any meaning for Liferay, in my opinion. Is there some way to do this? Obviously we could just always deploy the file with a fixed file name, but somehow it seems to me like we are doing something wrong, missing a configuration setting or something. Is there a way of forcing a unique ID on a theme?

2
inside look and feel tag "<theme id="theme-id" name="theme name" />" in liferay look and feel.xmlLaxman Rana
@LuckyBoy Yes, but the theme id specified here will only be the xxxx part in xxxx_WAR_yyyy, so I don't have full control over the theme ID. There is a part that is generated from the name of the .war file.Till Helge

2 Answers

0
votes

In your pom.xml of theme project, give this

<artifactId>your-theme</artifactId>
<name>${project.artifactId}</name>

This should create a same name artifact when you deploy any version of your theme.

0
votes

According to the first paragraph of the question as a solution i think , if at first you'll disable the older version theme(not only do it from admin section but also remove that specific theme directory from webapps) , then deploy the newer version of theme. Next enable the newer version theme for all public pages from liferay admin section .Then if you check , in all pages newer version of the theme been applied . If you wish , can also try in this way . Hope this'll be helpful .