Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
Kiran Kumar
Setting default theme in portal-ext.properties not working
19 de Outubro de 2010 02:19
Resposta

Kiran Kumar

Ranking: New Member

Mensagens: 6

Data de entrada: 18 de Outubro de 2010

Mensagens recentes

I am trying to set the default theme of the portal using the porperty "default.theme.id" in portal-ext.properties, as specified in http://www.liferay.com/community/wiki/-/wiki/Main/How+To+Change+Liferay+Default+Theme. Bu the default theme is still set to classic. But the theme is getting loaded properly and is available for use.

Appreciate any help in this regard.
Maarten van Heiningen
RE: Setting default theme in portal-ext.properties not working
21 de Outubro de 2010 00:54
Resposta

Maarten van Heiningen

Ranking: Regular Member

Mensagens: 172

Data de entrada: 5 de Fevereiro de 2009

Mensagens recentes

Hi Kiran,

When your theme is deployed on the server you can select the default theme in the control panel in the section of your Display settings of the instance.

In the left nav bar of your controlpanel choose settings of your instance. On the right now choose Display settings and here you will find a dropdown with all loaded theme's available on the server. Choose and save.

Regards,
Maarten
Baptiste Grenier
RE: Setting default theme in portal-ext.properties not working
21 de Outubro de 2010 01:35
Resposta

Baptiste Grenier

Ranking: Regular Member

Mensagens: 100

Data de entrada: 30 de Junho de 2009

Mensagens recentes

Try like this:
For a theme with id internal (see the theme's WEB-INF/{liferay-look-and-feel.xml,liferay-plugin-package.properties}), I have to specify the theme in the portal-ext.properties like this:
1default.regular.theme.id=internal_WAR_internaltheme


Regards,
Baptiste
Maarten van Heiningen
RE: Setting default theme in portal-ext.properties not working
22 de Outubro de 2010 01:46
Resposta

Maarten van Heiningen

Ranking: Regular Member

Mensagens: 172

Data de entrada: 5 de Fevereiro de 2009

Mensagens recentes

Hi Baptiste,

This is correct what you discribe. But when you have multiple instances and/or multiple clients/portals on 1 server this will enforce them all to be default set to this specific theme.

The new way for liferay is to use this from the controlpanel and thus giving the instance administrator full controle.

(also this makes the use of the site template functionality much easier.)

Regards,
Maarten
Baptiste Grenier
RE: Setting default theme in portal-ext.properties not working
22 de Outubro de 2010 04:36
Resposta

Baptiste Grenier

Ranking: Regular Member

Mensagens: 100

Data de entrada: 30 de Junho de 2009

Mensagens recentes

Hi Maarten,
Yes it's true that I am now aware of a way to do this in a portal-ext.properties.

Regarding the "new way for liferay" I try to avoid to do manual configuration of the portal using the Control Panel, I prefer to automatize configuration using the portal-ext.properties as much as possible. emoticon
If I had to do such a thing I would probably tryo to set the theme porgrammatically from a hook where it is possible to select on which instance/community/... the theme will apply:

1// Set custom theme as default for private and public layouts for the Guest community
2final Group group = GroupLocalServiceUtil.getGroup(companyId, GroupConstants.GUEST);
3LayoutSetLocalServiceUtil.updateLookAndFeel(group.getGroupId(), false, "my_WAR_mytheme", "01", "", false);
4LayoutSetLocalServiceUtil.updateLookAndFeel(group.getGroupId(), true, "my_WAR_mytheme", "01", "", false);


Regards,
Baptiste
Maarten van Heiningen
RE: Setting default theme in portal-ext.properties not working
23 de Outubro de 2010 03:18
Resposta

Maarten van Heiningen

Ranking: Regular Member

Mensagens: 172

Data de entrada: 5 de Fevereiro de 2009

Mensagens recentes

Hi Baptiste,

It's correct that the portal-ext.properties has a more strict way of configurating your portal. But on each change you have to restart and the control panel has a more unified structure.

For things like the themes, download/upload, languages, etc the control panel is much more flexible especialy when you have multiple instances.

However if you have to configure let's say the calender portlet I absolutly conclude with you because not all portlets (especialy the older portlets) can be configured from the controle panel. But this will also change with upcomming releases.
I think the only thing left to set in the portal-ext.properties in the future will be the database connection.

I guess there is no one way to do this, but a multiple ways of getting there emoticon

Regards,
Maarten
Baptiste Grenier
RE: Setting default theme in portal-ext.properties not working
25 de Outubro de 2010 01:14
Resposta

Baptiste Grenier

Ranking: Regular Member

Mensagens: 100

Data de entrada: 30 de Junho de 2009

Mensagens recentes

Hi Marteen,
My main concern with customization using in the control panel is that you have to made them manually, and they are not stored in a Source Code Management system ;)

I agree that there are multiple way of getting things done, and I hope that configuring a portal completely from the portal-ext.properties/code will still stay possible, being able to deploy a full working portal pre-configured at you will without having to login and manually do changes seems wonderful to me emoticon
For me it's more a handy way of pre-configuring a portal before deployment than reconfiguring after deployment, especially due to the need of a restart...
For daily maintenance it's sure that the Control Panel is a lot more adapted, but for a pre-deploy customization portal-ext.properties/hook is the way to go.

For now I didn't had to work with multiple-instances portal so... I know that it seems possible to have distinct portal-ext.properties per portal instance but I did not try it.

Cheers,
Baptiste
Kiran Kumar
RE: Setting default theme in portal-ext.properties not working
26 de Outubro de 2010 03:24
Resposta

Kiran Kumar

Ranking: New Member

Mensagens: 6

Data de entrada: 18 de Outubro de 2010

Mensagens recentes

Thanks Marteen & Baptiste for the information. I was looking for a way to set the default theme automatically. Setting "default.regular.theme.id" in portal-ext.properties works for me.

Cheers,
Kiran
Kiran Kumar
RE: Setting default theme in portal-ext.properties not working
10 de Novembro de 2010 02:02
Resposta

Kiran Kumar

Ranking: New Member

Mensagens: 6

Data de entrada: 18 de Outubro de 2010

Mensagens recentes

In a clean Liferay bundle (which has not been stated even once), I have added a theme in the “deploy” folder of Liferay and the same theme is set as default theme in portal-ext.properties.
When Liferay is started the following errors are observed in console:

Loading file:/C:/work/liferay/test/bundles/tomcat-6.0.26/webapps/default-site-te
mplates-hook/WEB-INF/classes/portal.properties
07:17:26,284 WARN [ThemeLocalServiceImpl:121] No theme found for specified them
e id noir_WAR_noirtheme. Returning the default theme.
07:17:26,284 ERROR [ThemeLocalServiceImpl:145] No theme found for default theme
id noir_WAR_noirtheme. Returning a random theme.
07:17:26,315 WARN [ThemeLocalServiceImpl:121] No theme found for specified them
e id noir_WAR_noirtheme. Returning the default theme.
07:17:26,315 ERROR [ThemeLocalServiceImpl:145] No theme found for default theme
id noir_WAR_noirtheme. Returning a random theme.
07:17:26,331 WARN [ThemeLocalServiceImpl:121] No theme found for specified them
e id noir_WAR_noirtheme. Returning the default theme.
07:17:26,347 ERROR [ThemeLocalServiceImpl:145] No theme found for default theme
id noir_WAR_noirtheme. Returning a random theme.
07:17:26,347 WARN [ThemeLocalServiceImpl:121] No theme found for specified them
e id noir_WAR_noirtheme. Returning the default theme.
07:17:26,347 ERROR [ThemeLocalServiceImpl:145] No theme found for default theme
id noir_WAR_noirtheme. Returning a random theme.

But after the server is started, the default theme is getting set to the one that I mentioned in portal-ext.properties and for any communities or organizations that are created after the portal is started, the default theme is getting set properly. But for the communities (Liferay community) that get created by default, the default theme is not getting set to the one mentioned in portal-ext.properties.
James Min
RE: Setting default theme in portal-ext.properties not working
30 de Novembro de 2010 11:49
Resposta

James Min

LIFERAY STAFF

Ranking: Expert

Mensagens: 293

Data de entrada: 14 de Agosto de 2006

Mensagens recentes

It's just not finding that theme, so the ID must be wrong.

look at this wiki article for how the IDs are interpreted:

http://www.liferay.com/community/wiki/-/wiki/Main/Theme+Id+or+Portlet+Id+references+in+portal-ext.properties


If you are tearing your hair out on what the ID of a theme, for example is, go to your DB and look at the LayoutSet table in the themeId column, and you will see what the ID is of a custom theme WAR.