Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Sean Truman
Custom theme only displays correctly when in Developers mode.
September 1, 2009 8:45 AM
Answer

Sean Truman

Rank: New Member

Posts: 1

Join Date: August 10, 2009

Recent Posts

All,

We used the documentation and created a theme using the Plugin SDK for Liferay 5.2.3. The theme works great when I deploy it to a Liferay portal that has Developers mode turned on. When I deploy it to a Liferay portal without the Developers mode Liferay tries to render the theme as if it was a bare page (No styling). I have notice that on the portal without the Developers mode turn on that uses barebone.jsp and none of the JQuery scrips are loaded. Any help is greatly appreciated.

Sean
Bob Lyman
RE: Custom theme only displays correctly when in Developers mode.
September 1, 2009 11:47 AM
Answer

Bob Lyman

Rank: New Member

Posts: 7

Join Date: August 31, 2009

Recent Posts

I'm running into the same problem only I'm not sure if I'm running in developer mode or not.

Alas I have great enthusiasm for this product, but I can't seem to get a theme to work even a basic one with minimal changes.

See the attached file for the results I'm getting.

-bob
Attachment

Attachments: theme_dev.png (105.1k)
Anonymous
RE: Custom theme only displays correctly when in Developers mode.
September 2, 2009 1:02 AM
Answer

Anonymous

Hi Bob,

Please explain briefly. I don't know what's your problem.

Any have, I will give my tips here.

To develop a theme please follow the steps.

1. setup plugin environment.

2. From plugin/themes use the following command to create theme.
ant create -Dtheme.name=sample -Dtheme.display.name="My Sample Theme" (or)
create.bat sample "My Sample Theme"

3. sample theme will be created with very minimal style. It will be tough for to alter this.
For making yourself easy we need to create the theme like classic.
Then it is easy for u to modify.

4.Copy the code from the server
tomcat/ webapps/ROOT/html/themes/classic

except the _diffs folder copy all the remaining folder and place inside your theme in _diffs folder in following path
plugin/themes/sample/_diffs

5.Deploy this theme you will get the exact classic theme. Then you start doing changes on that theme. It is easy for u to develop the quick theme.


Note:

Your need to chnge only in _diffs folder. Then only you changes will files will get override the other.


Thanks in Advance,

V.C.Vijayan
Software Developer, TransIT mPower Labs (P) Ltd.
info@mpowerglobal.com
mPower Global Inc.
A Liferay expert company.
Bob Lyman
RE: Custom theme only displays correctly when in Developers mode.
September 2, 2009 6:13 AM
Answer

Bob Lyman

Rank: New Member

Posts: 7

Join Date: August 31, 2009

Recent Posts

I did as you described and it worked!

Thanks for your help.

Now can someone please change the wiki to reflect this? :-)
Bob Lyman
RE: Custom theme only displays correctly when in Developers mode.
September 2, 2009 8:02 AM
Answer

Bob Lyman

Rank: New Member

Posts: 7

Join Date: August 31, 2009

Recent Posts

Well I thought it worked.

Turns out it didn't pick up the theme until I copied three extra files from the WEB-INF folder. Then it found the theme, but when I clicked on it I get the same result.

Here is what I've done:

1) Installed the plugin sdk

2) ran create.bat moondance "Moondance Pottery"

3) Copied the files from tomcat/webapps/ROOT/html/themes/classic (css, images, javascript, templates) to my _diffs folder

4) Copied liferay-look-and-feel.xml, liferay-plugin-package.xml and web.xml to my WEB-INF folder. It seems without these Liferay will not see my theme once deployed. I changed specific properties within each file pertaining to my installation as needed.

5) Made a change to custom.css to change the background color to #7a89a6 so I'd know I had the right theme.

6) ran ant

7) Browsed to look and feel and I see the theme available, but when I select it I get the above result.

I tried attaching a file to this with my source code but unfortunately it won't go.

Please somebody tell me what I'm doing wrong. I have spent 3 days trying to figure this out and alas I am about to toss this product and go with my backup plan which I'd rather not do.

I can't believe this is that hard and everyone makes it sound so easy, but I never get the same result.

-bob
Bob Lyman
RE: Custom theme only displays correctly when in Developers mode.
September 2, 2009 8:30 AM
Answer

Bob Lyman

Rank: New Member

Posts: 7

Join Date: August 31, 2009

Recent Posts

Ok,

Finally figured it out.

The ant build file build-common-plugin.xml includes the version number as part of the war file (Lines 57 and 60). This means that it deploys with the version number, but if you don't include the version number in the actual theme id it will not load it properly.

By removing the version number ( -${lp.version}.${plugin.version} ) from those lines (actually the jar file line probably doesn't matter but for consistency I removed it) it worked.

Thanks for any advice.

-bob
Anonymous
RE: Custom theme only displays correctly when in Developers mode.
September 2, 2009 9:42 AM
Answer

Anonymous

Hi Bob,

I think everything is fine in your side.

One Question what is your liferay version?

If any further help please fell free to contact me.


Thanks in Advance,

V.C.Vijayan
Software Developer, TransIT mPower Labs (P) Ltd.
info@mpowerglobal.com
mPower Global Inc.
A Liferay expert company.
Wilson Man
RE: Custom theme only displays correctly when in Developers mode.
September 2, 2009 10:16 AM
Answer

Wilson Man

LIFERAY STAFF

Rank: Liferay Master

Posts: 580

Join Date: June 21, 2006

Recent Posts

Bob Lyman:
I did as you described and it worked!

Thanks for your help.

Now can someone please change the wiki to reflect this? :-)


hey Bob, the Liferay wiki is meant to be community driven. So feel free to add your new found answers to the wiki if you have time. thanks, and glad to have you on our Message Boards!