0

I'm still familiarizing myself with Liferay. I currently have liferay 6.1, running on Glassfish on a linux server. Right now, I'm trying to edit and view the edits of multiple themes that I have downloaded and included in my themes location of a deployed Liferay instance.

My question is, what is the directory convention and best practices for theme customization. I've added the themes through the Liferay GUI itself but for more custom editing I'm directly editing CSS files in the themes/ directory.

I'm having trouble finding information regarding the build and directory information. How does liferay know which theme is active at a given time? Is this reflected in the directory? Is there an 'Current Theme' folder? Is there an easy way to easily swap out themes that I'm editing? Should I be using the __diff directory or is this only used when editing from the GUI?

Randnum
  • 1,360
  • 4
  • 32
  • 48

1 Answers1

0

You shouldn't edit a deployed theme in the appserver's directory. If you edit/develop a theme, you're typically editing files in the _diffs folder. Each theme is built as "the difference" to a base theme, typically one of Liferay's _styled or _unstyled themes. Everything that is different from them (typically you start with css/custom.css goes into the _diffs folder. Upon build (and prior to deployment) everything gets merged and subsequently used by Liferay.

There's no "current" theme, as Liferay can have a theme per page, or per site (e.g. Liferay can maintain many sites - and pages - each with their own theme). You choose the active theme per site or page in the page administration (Manage/Page, select Look&Feel).

Please read more in the Developer's Guide and Wiki.

Also, the 6.1 branch (if you're speaking of CE) is discontinued, you might want to upgrade to 6.2 unless you're using Enterprise Edition, which is still supported for a few years.

Olaf Kock
  • 46,930
  • 8
  • 59
  • 90
  • for example I have pixeled_theme and beveled_theme in my themes folder each one has a custom.css file but when I look in my domain1/applicaitons/liferay-portal/html/themes folder and look at the custom.css file it doesn't look like the custom.css of the beveled or the pixeled theme, theme for that site. Where is the current theme loaded? Is there a directory difference between available themes I've downloaded and the one that is currently being displayed? – Randnum Jun 09 '14 at 19:20
  • 1
    Did I understand correctly that you edit the themes folder of Liferay? This would be wrong: You use the plugins sdk to create a new project, containing your theme and build it from there (e.g. with ant, there's a maven option too). Read the developer guide that I've linked. The theme ends up as a separate webapplication deployed to your appserver. – Olaf Kock Jun 10 '14 at 06:49
  • That's what I'm asking. If I want to customize a free theme I've downloaded and installed from a 3rd party how do I edit this? Isn't this done in the themes folder where the theme is actually located? For example, I downloaded the "Beveled" theme which contains a mock logo. I want to replace the logo, or maybe I want to change the CSS font slightly. This has to be done with the theme code. which is located in the themes folder. so is _diffs, so is _styled, which you mentioned above. – Randnum Jun 10 '14 at 15:22