掲示板

Help with theme.parent option

8年前 に luka bizjak によって更新されました。

Help with theme.parent option

New Member 投稿: 7 参加年月日: 15/10/12 最新の投稿
Hello,

Few years ago a one company made theme for my company's intranet.

Now i have been tasked to redesign intranet a bit, update it, etc etc... I would like to use the same theme, just change it a bit. I would like to change few colors, and width of the whole page, it is very narrow. But that is not a problem, I know which settings to change etc...

Problem is, when i create new theme, and when i want to use this current custom companys theme as Parent, it doesnt work. I just cant get that part to work. I tried a lot of things.

Here is what i have now:
Im using liferay developer studio, and i created new liferay plugin project and named it "myTheme", build type is Ant, SDK is liferay-plugins-sdk-6.2-ee-sp11, runtime is liferay v 6.1 CE (tomcat 7)
Then i went to our 6.1 liferay install directory and into webapps folder, and copied existing company's theme folder, to my themes folder in SDK directory
then i went to build.xml file of myTheme, and set this property, so that it would inherit everything from existing company's theme
<property name="theme.parent" value="C:\TEMP\liferay-developer-studio\liferay-plugins-sdk-6.2-ee-sp11\themes\skb-liferay-theme" />

Then if i click refresh inside Liferay developer studio, i get this error
BUILD FAILED
C:\TEMP\liferay-developer-studio\liferay-plugins-sdk-6.2-ee-sp11\themes\build-common-theme.xml:157: The following error occurred while executing this line:
java.io.FileNotFoundException: C:\TEMP\liferay-developer-studio\liferay-plugins-sdk-6.2-ee-sp11\themes\skb-liferay-theme\build.xml (The system cannot find the file specified)


There is indeed build.xml file missing, because I basically just copied company themes folder from installed liferay directory... where it was already deployed.

So how can i fix this? Should i just create dummy build.xml file, or do i need to contact the company who made this theme, so that they give me original theme files before they were deployed onto liferay, or what do I do?
thumbnail
8年前 に Olaf Kock によって更新されました。

RE: Help with theme.parent option

Liferay Legend 投稿: 6403 参加年月日: 08/09/23 最新の投稿
You're copying something into the plugins SDK, and the plugins SDK assumes that it's probably content of a plugins-SDK. In other words: Reference the full build version of your theme (which might reference yet another parent)

Also, you might want to use forward slashes (/) as separators for your file names.

And I can't go without referencing this ancient article
8年前 に luka bizjak によって更新されました。

RE: Help with theme.parent option

New Member 投稿: 7 参加年月日: 15/10/12 最新の投稿
Thank you for quick reply.

I already had that blog post opened, thats how i found out about "not-quite-so-well known feature" emoticon

I tried what you proposed, that i directly link to theme folder in liferay installation, but same error continues, it wants that build.xml, which isnt there.

<property name="theme.parent" value="C:/AppServers/liferay-portal-6.1.2-ce-ga3/tomcat-7.0.40/webapps/skb-liferay-theme" />


error is:
BUILD FAILED
C:\TEMP\liferay-developer-studio\liferay-plugins-sdk-6.2-ee-sp11\themes\build-common-theme.xml:157: The following error occurred while executing this line:
java.io.FileNotFoundException: C:\AppServers\liferay-portal-6.1.2-ce-ga3\tomcat-7.0.40\webapps\skb-liferay-theme\build.xml (The system cannot find the file specified)


I did use forward slashes in build.xml, but in error desription it reverses them, so thats odd... But yeah, build.xml file is missing, thats a fact.

But if i go to folder of the "deep blue theme", the one that i created by following tutorial, it also doesnt have build.xml file once it gets deployed onto installed liferay... so yeah, Im really wondering how to modify theme when all you have is installed theme files.

I suppose duplicating installed theme files, renaming it and then just manually going through some properties that i want to change (like width), wouldn't work?
thumbnail
8年前 に Dave Weitzel によって更新されました。

RE: Help with theme.parent option

Regular Member 投稿: 208 参加年月日: 09/11/18 最新の投稿
build.xml is part of the SDK folder structure so gets removed when packaging for deployment.
Given the theme specifics should only be in resources-importer folder and _diffs folder I would have created a new project for the old company theme and then copied those files into it rather than just expanding the war file then all the SDK project files are created for you.
You probably could get away with creating a build.xml by copying from another theme and editing the paths .

You will need to know which theme the original was based on (_styled, _unstyled etc)

When building your new theme it will also build the old one in case there were changes to tha.

if you do not need the old theme anyway then why not just use the custom.css file and templates as starters for your new theme and edit them directly?
8年前 に luka bizjak によって更新されました。

RE: Help with theme.parent option

New Member 投稿: 7 参加年月日: 15/10/12 最新の投稿
if you do not need the old theme anyway then why not just use the custom.css file and templates as starters for your new theme and edit them directly?

Thanks for reply. Yes, I would very much like to do something like this.

For example, i went into theme files for companys theme in liferay installation directory, and navigated to custom.css, where all css is... and lets say i want to change only this small bit.
#mainNavTop {
	height:50px;
	/*height:30px;*/
	margin-left:30px;
}

I opened it in notepad, and changed it from height 30px, to height 50px... but once i save this custom.css file, nothing gets refreshed or updated on our liferay. mainNavTop height is still 30px. Just as i was expecting actually...

So how do i apply those changes to our live liferay.

Do i need to restart server? or clear cache? I hope it is something straightforward as this. I really hope I do not need to go through liferay developer studio to redeploy and all that stuff... I just want to modify existing theme that is installed on liferay, preferably with notepad. What would the easiest way be.