Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
gordon daniels
change theme background 6.1ga1 (solved - sort of)
12 de Abril de 2012 12:33
Resposta

gordon daniels

Ranking: Liferay Master

Mensagens: 735

Data de entrada: 23 de Agosto de 2008

Mensagens 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
Jignesh Vachhani
RE: change theme background 6.1ga1
5 de Março de 2012 22:48
Resposta

Jignesh Vachhani

Ranking: Liferay Master

Mensagens: 795

Data de entrada: 10 de Março de 2008

Mensagens 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
RE: change theme background 6.1ga1
5 de Março de 2012 23:09
Resposta

gordon daniels

Ranking: Liferay Master

Mensagens: 735

Data de entrada: 23 de Agosto de 2008

Mensagens recentes

thanks. I will give it a try.
gordon daniels
RE: change theme background 6.1ga1
6 de Março de 2012 06:45
Resposta

gordon daniels

Ranking: Liferay Master

Mensagens: 735

Data de entrada: 23 de Agosto de 2008

Mensagens 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
Olaf Kock
RE: change theme background 6.1ga1
6 de Março de 2012 11:04
Resposta

Olaf Kock

LIFERAY STAFF

Ranking: Liferay Legend

Mensagens: 3570

Data de entrada: 23 de Setembro de 2008

Mensagens 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
RE: change theme background 6.1ga1
6 de Março de 2012 14:00
Resposta

gordon daniels

Ranking: Liferay Master

Mensagens: 735

Data de entrada: 23 de Agosto de 2008

Mensagens 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.
Jignesh Vachhani
RE: change theme background 6.1ga1
7 de Março de 2012 02:42
Resposta

Jignesh Vachhani

Ranking: Liferay Master

Mensagens: 795

Data de entrada: 10 de Março de 2008

Mensagens 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
RE: change theme background 6.1ga1
7 de Março de 2012 06:13
Resposta

gordon daniels

Ranking: Liferay Master

Mensagens: 735

Data de entrada: 23 de Agosto de 2008

Mensagens 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
RE: change theme background 6.1ga1
7 de Março de 2012 08:44
Resposta

gordon daniels

Ranking: Liferay Master

Mensagens: 735

Data de entrada: 23 de Agosto de 2008

Mensagens 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.
Olaf Kock
RE: change theme background 6.1ga1
7 de Março de 2012 14:45
Resposta

Olaf Kock

LIFERAY STAFF

Ranking: Liferay Legend

Mensagens: 3570

Data de entrada: 23 de Setembro de 2008

Mensagens 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
RE: change theme background 6.1ga1
7 de Março de 2012 18:05
Resposta

gordon daniels

Ranking: Liferay Master

Mensagens: 735

Data de entrada: 23 de Agosto de 2008

Mensagens 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
RE: change theme background 6.1ga1
8 de Março de 2012 09:06
Resposta

gordon daniels

Ranking: Liferay Master

Mensagens: 735

Data de entrada: 23 de Agosto de 2008

Mensagens 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
RE: change theme background 6.1ga1
12 de Abril de 2012 12:36
Resposta

gordon daniels

Ranking: Liferay Master

Mensagens: 735

Data de entrada: 23 de Agosto de 2008

Mensagens 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.
Olaf Kock
RE: change theme background 6.1ga1
13 de Abril de 2012 06:22
Resposta

Olaf Kock

LIFERAY STAFF

Ranking: Liferay Legend

Mensagens: 3570

Data de entrada: 23 de Setembro de 2008

Mensagens recentes

My guess is that it would work if you activated the settings from portal-developer.properties, especially
1theme.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
RE: change theme background 6.1ga1
16 de Abril de 2012 06:34
Resposta

gordon daniels

Ranking: Liferay Master

Mensagens: 735

Data de entrada: 23 de Agosto de 2008

Mensagens 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
RE: change theme background 6.1ga1
27 de Abril de 2012 09:48
Resposta

gordon daniels

Ranking: Liferay Master

Mensagens: 735

Data de entrada: 23 de Agosto de 2008

Mensagens 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.