Fórum

RE: change theme background 6.1ga1

gordon daniels, modificado 12 Anos atrás.

change theme background 6.1ga1 (solved - sort of)

Liferay Master Postagens: 797 Data de Entrada: 24/08/08 Postagens Recentes
I am trying to get familiar with 6.1. I want to change the background on a theme and used the convention that works in my 6.0 portal.

background: url(../images/bg.png) repeat -x 00;

but the background does not change. This is in the custom.css file.

any help?

thanks
thumbnail
Jignesh Vachhani, modificado 12 Anos atrás.

RE: change theme background 6.1ga1

Liferay Master Postagens: 803 Data de Entrada: 10/03/08 Postagens Recentes
Try to use
background: url(../images/bg.png) repeat -x 000 !important;
Because might be there would be some existing CSS which may override or conflict with this css class.
Hope this will help you.
gordon daniels, modificado 12 Anos atrás.

RE: change theme background 6.1ga1

Liferay Master Postagens: 797 Data de Entrada: 24/08/08 Postagens Recentes
thanks. I will give it a try.
gordon daniels, modificado 12 Anos atrás.

RE: change theme background 6.1ga1

Liferay Master Postagens: 797 Data de Entrada: 24/08/08 Postagens Recentes
well that did not work.

1. I am using 6.1ga1.
2. Using classic theme: modifying file - 'custom.css' to change background.
3. Within 'custom.css, under heading 'Base Styles', body {
background: #242424 url(../images/body.png) repeat -x 000!important; - that is where I am changing background.
4. Is this the right place?

I have created themes and modified existing themes in 6.0 and have not had this problem. Any help would be appreciated.

thanks
thumbnail
Olaf Kock, modificado 12 Anos atrás.

RE: change theme background 6.1ga1

Liferay Legend Postagens: 6396 Data de Entrada: 23/09/08 Postagens Recentes
Are you using plugins-sdk and build a theme based on classic or are you manipulating classic theme directly in liferay?

Do you use firebug? This will show you if your modification actually goes through to your browser and what it's overridden by if that's the case
gordon daniels, modificado 12 Anos atrás.

RE: change theme background 6.1ga1

Liferay Master Postagens: 797 Data de Entrada: 24/08/08 Postagens Recentes
I am trying to directly modify classic theme. I have sdk installed and have used it before. I was hoping to do a little change quick and dirty but it has turned out to be a major hassel.

Firebug is a good idea. I think I will use sdk and make simple change there.

thanks for taking the time to reply.
thumbnail
Jignesh Vachhani, modificado 12 Anos atrás.

RE: change theme background 6.1ga1

Liferay Master Postagens: 803 Data de Entrada: 10/03/08 Postagens Recentes
Also one more quick way you can use is,
you can override existing CSS using controlpanel >>Sites >> managepanges >> Look and feel
just override complete css class and put it over here by applying !important in css element style.
like :

body {
background: #242424 url(../images/body.png) repeat -x 000 !important;
{

Most probably this will resolve your query.
gordon daniels, modificado 12 Anos atrás.

RE: change theme background 6.1ga1

Liferay Master Postagens: 797 Data de Entrada: 24/08/08 Postagens Recentes
Jignesh: thanks for replying. That does not work. There are no erro msgs in logs. I keep saying this, but I have changed themes alot, and can't understand why this isn't working.

Has anyone actually changed the background on 6.1ga1 classic theme? I've tried sdk and modfiying directly. Nothing works. I really would like to know what is causing this.

thanks
gordon daniels, modificado 12 Anos atrás.

RE: change theme background 6.1ga1

Liferay Master Postagens: 797 Data de Entrada: 24/08/08 Postagens Recentes
well, I've tried everything I know how to do and still can not change background color or have it read a background image.

I tried changing the background in Sevecogs theme and same behavior. Is it impossible to change custom.css directly? Do we now have to make changes only thru sdk?

What is interesting is that I can change navigation bar in custom.css.

anyone else seeing this behavior? I even did a pristine install with no mods and still can not change background.

this is extremely frustrating.
thumbnail
Olaf Kock, modificado 12 Anos atrás.

RE: change theme background 6.1ga1

Liferay Legend Postagens: 6396 Data de Entrada: 23/09/08 Postagens Recentes
I can't check currently, but my best guess is that you're observing the minifier in action: The css files don't actually get delivered, because they have already been minified (e.g. no whitespaces, just one file).

The "real" tip is to create a new theme, based on classic. this blog post might help you there. Then configure this new theme to be the new default theme (you can do this in portal-ext.properties) or just use it in your installation.

Another option could be (not tested) to delete tomcat's (if you're using this) temp directory. AFAIK this contains the minified files. I don't know if this requires a restart. Be aware that you will raise your amount of work for future upgrades if you directly change Liferay instead of going through a plugin.
gordon daniels, modificado 12 Anos atrás.

RE: change theme background 6.1ga1

Liferay Master Postagens: 797 Data de Entrada: 24/08/08 Postagens Recentes
Olaf: thanks for taking the time to reply. I have built many themes with the sdk. One of my posts I mention that I tried that but it did not work. I've tried directly but to no avail. I will take a look at the temp file and see whats there.

thanks
gordon daniels, modificado 12 Anos atrás.

RE: change theme background 6.1ga1

Liferay Master Postagens: 797 Data de Entrada: 24/08/08 Postagens Recentes
I downloaded 6.1ga1 again. Configured it for mysql. Started it up and no errors.

The problem still exists. Cannot change background of classic or seven-cogs. I tried with sdk and modfiying file directly. I create themes for 6.0.6 all the time with no problems.

This is extremely frustrating. Has anyone been successful in creating themes for classic or seven-cogs? I am really hoping its me because it would be very distrubing to think liferay released a ga1 rating and themeing doesn't work.

anyone?
gordon daniels, modificado 11 Anos atrás.

RE: change theme background 6.1ga1

Liferay Master Postagens: 797 Data de Entrada: 24/08/08 Postagens Recentes
Well, I finally was able to change the theme. I had to use the sdk but liferay's documentation did not work. However, I found some old third party posts on internet about how to create theme and it worked. I still don't understand why I could not modify custom.css file directly. For a quick test of background color it would have been helpful.

thanks to those who tried to help.
thumbnail
Olaf Kock, modificado 11 Anos atrás.

RE: change theme background 6.1ga1

Liferay Legend Postagens: 6396 Data de Entrada: 23/09/08 Postagens Recentes
My guess is that it would work if you activated the settings from portal-developer.properties, especially
theme.css.fast.load=false


The reason - as I've stated above - is the minifier that combines all css files into one, so that you get all your css with a single http request. Your browser typically never requests custom.css - only the minified version that is combined from all css files in the theme.

As 6.1 has introduced SASS/Compass, this area has definitely been worked on, so I'm not too surprised that some behaviour that happened to work in 6.0 now has changed. However, it was never meant to work in the first place - you've just been lucky with 6.0 (if I understood correctly what you were trying to do)
gordon daniels, modificado 11 Anos atrás.

RE: change theme background 6.1ga1

Liferay Master Postagens: 797 Data de Entrada: 24/08/08 Postagens Recentes
thanks for the reply. I have the developer properties turned on, but will try that one specifically. Thanks again for your help.
gordon daniels, modificado 11 Anos atrás.

RE: change theme background 6.1ga1

Liferay Master Postagens: 797 Data de Entrada: 24/08/08 Postagens Recentes
Well, I found the answer in a post in custom theme area. The docroot/css/.saas_cache folder is not being updated, so needs to be deleted before building theme. I posted a bug report about this issue on Mar 08 2012 but no one has followed up.

http://issues.liferay.com/browse/LPS-25981?focusedCommentId=187110#comment-187110


here is the link to work around:
http://www.liferay.com/community/forums/-/message_boards/message/13500813

thanks goes to Jose for figuring this out.