Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
Juhi Kumari
How to develop custom theme for control panel
March 27, 2012 6:37 AM
Answer

Juhi Kumari

Rank: Expert

Posts: 347

Join Date: December 12, 2011

Recent Posts

Hi,
I am trying to develop a custom theme for control panel. So I created a new theme, follow the same directory structure as in control_panel theme.
I made changes in custom.css under _diffs but its not reflecting any change in browser.
If any idea please share!!

Regards
Juhi
Dhrutika Vyas
RE: How to develop custom theme for control panel
March 27, 2012 10:57 PM
Answer

Dhrutika Vyas

Rank: Expert

Posts: 435

Join Date: February 9, 2009

Recent Posts

Hi Juhi,

There must be some deployment issues in theme. Verify that your theme changes has been there in tomcat folder or not.

Regards,
Dhrutika
Venkat Koppavolu
RE: How to develop custom theme for control panel
March 28, 2012 2:11 AM
Answer

Venkat Koppavolu

Rank: Junior Member

Posts: 85

Join Date: July 25, 2010

Recent Posts

Steps to create custom theme which has parent as control_panel

1. Specify the theme.parent property in your theme build.xml
<property name="theme.parent" value="control_panel" />
2. We need to do small change in our build-common-theme.xml in SDK Plug in.
there is a condition specify call for copying server files to custom theme( _styled, unstyled and classic)
Add below lines at line no: 209 ( same as classic theme)
<elseif>
<equals arg1="${theme.parent}" arg2="control_panel" />
<then>
<copy todir="docroot" overwrite="true">
<fileset
dir="${app.server.portal.dir}/html/themes/control_panel"
excludes="_diffs/**,templates/**"
/>
</copy>

<copy todir="docroot/templates" overwrite="true">
<fileset
dir="${app.server.portal.dir}/html/themes/control_panel/templates"
includes="*.${theme.type}"
/>
</copy>
</then>
</elseif>
3. Make your changes at _diff and build your theme and deploy.

Thanks,
Venkat
Juhi Kumari
RE: How to develop custom theme for control panel
March 29, 2012 2:27 AM
Answer

Juhi Kumari

Rank: Expert

Posts: 347

Join Date: December 12, 2011

Recent Posts

Hi Venkat,
Thanks for reply. I did the same but its not working for me. In portal-ext.properties I mention this line
1control.panel.layout.regular.theme.id=cpanel

but still control_panel theme is working. Don't know how to solve this problem??

Regards
Juhi
Venkat Koppavolu
RE: How to develop custom theme for control panel
March 29, 2012 4:16 AM
Answer

Venkat Koppavolu

Rank: Junior Member

Posts: 85

Join Date: July 25, 2010

Recent Posts

You should try with Plugin ID instead of themeId.
Plugin ID is generating differently for plug-ins, check liferay-look-and-feel.xml

Ex: If below is an entry in your liferay-look-and-feel.xml for custom theme
<theme id="cpanel" name="CPanel" /> then your theme Id will be -> cpanel_WAR_cpaneltheme

Simply you can check using below steps
Control Panel -> Plugins Configuration -> Theme Plug-in -> Select / Click Your custom Theme -> Check for Plugin ID

#control.panel.layout.regular.theme.id=Plugin ID
control.panel.layout.regular.theme.id=cpanel_WAR_cpaneltheme

Thanks,
Venkat
Juhi Kumari
RE: How to develop custom theme for control panel
March 29, 2012 4:36 AM
Answer

Juhi Kumari

Rank: Expert

Posts: 347

Join Date: December 12, 2011

Recent Posts

Hi
I also tried for
1control.panel.layout.regular.theme.id=cpanel_WAR_cpaneltheme

But no use. BTW cpanel theme is not showing under Plugin Configuration ->Theme Plugins.
Can you tell me where I am missing??

Regards
Juhi
Venkat Koppavolu
RE: How to develop custom theme for control panel
March 29, 2012 5:17 AM
Answer

Venkat Koppavolu

Rank: Junior Member

Posts: 85

Join Date: July 25, 2010

Recent Posts

Is your theme Deployed in server correctly?

Try with these steps
Manage -> Page -> Look and Feel, you will able to see your deployed theme. If not, theme is nor registered in server, you can't use it.

Troubleshooting
1.Check your theme folder at <TOMCAT_HOME>\webapps\<customname>-theme ( Check version and theme tag"
<look-and-feel>
<compatibility>
<version>6.0.11+</version>
</compatibility>
<theme id="cpanel" name="cpanel" />
</look-and-feel>

Please share your logs (Check tomcat console for any info)

Thanks,
Venkat
Juhi Kumari
RE: How to develop custom theme for control panel
March 29, 2012 5:53 AM
Answer

Juhi Kumari

Rank: Expert

Posts: 347

Join Date: December 12, 2011

Recent Posts

Hi Venkat,
Its deployed properly on server. Now my theme is coming under Manage Pages -> Look & Feel
and Control Panel -> Plugins Configuration -> Theme Plugins. But still its not applying for control panel .

Regards
Juhi
Venkat Koppavolu
RE: How to develop custom theme for control panel
March 29, 2012 10:48 PM
Answer

Venkat Koppavolu

Rank: Junior Member

Posts: 85

Join Date: July 25, 2010

Recent Posts

Simply , you can apply your custom theme for control panel through Admin UI.

Manage -> Control Panel -> Settings -> Display Settings -> Select your custom theme for Default Control Panel Theme -> Save

Hope this time it should work emoticon

Thanks,
Venkat
Juhi Kumari
RE: How to develop custom theme for control panel
March 30, 2012 2:24 AM
Answer

Juhi Kumari

Rank: Expert

Posts: 347

Join Date: December 12, 2011

Recent Posts

Hi
I forgot to tell I am using 5.2.3, where my theme is not coming under
Manage -> Control Panel -> Settings -> Display Settings -> Default Control Panel Theme .
Its working fine in LR6 but I am getting problem in LR5.2.3

Regards
Juhi
Srilalitha Pusuluri
RE: How to develop custom theme for control panel
September 20, 2012 12:52 PM
Answer

Srilalitha Pusuluri

Rank: New Member

Posts: 11

Join Date: February 24, 2012

Recent Posts

thanks Venkat, this is a helpful post.