Foros de discusión

Color schemes - Banner Image not rendered

thumbnail
prakash harigopal, modificado hace 13 años.

Color schemes - Banner Image not rendered

Regular Member Mensajes: 101 Fecha de incorporación: 23/06/10 Mensajes recientes
Hi,

Am looking at creating different color schemes in single theme to change few components colors. But i want to change the banner image at each color scheme by having a different image. Reg this i created a different color scheme under the custom theme and placed the logo css entry as follows

.empnw #heading .customlogo {
	background:url(../images/custom/ttw_en_banner.png) no-repeat scroll 0 0 transparent;
	display:block;
	font-size:0;
	height:120px;
	text-indent:-9999em;
	width:300px;
}


where empnw is the color scheme name , but always the newly added image is showing. When i select this particular color scheme for the page , then only it has to show the image otherwise it should show the default image thats referred in custom.css.

Do i need to change vm files in respect to this . Pls suggest.

thanks
Prakash.
thumbnail
Maarten van Heiningen, modificado hace 13 años.

RE: Color schemes - Banner Image not rendered

Regular Member Mensajes: 174 Fecha de incorporación: 5/02/09 Mensajes recientes
Hi,

Did you create a sub folder for each color scheme in the /Your_theme/images/color_scheme/A
& /Your_theme/images/color_scheme/B? Where A is your default theme and B is the theme with just minor chances.

You also need to set the liferay-look-and-feel.xml in /Your_theme/WEB-INF/ folder like something like this:


<theme id="classic" name="Classic">
<root-path>/html/themes/classic</root-path>
<templates-path>${root-path}/templates</templates-path>
<images-path>${root-path}/images</images-path>
<template-extension>vm</template-extension>
<color-scheme id="01" name="Blue">
<css-class>blue</css-class>
<color-scheme-images-path>${images-path}/color_schemes/${css-class}</color-scheme-images-path>
</color-scheme>
<color-scheme id="02" name="Green">
<css-class>green</css-class>
</color-scheme>
<color-scheme id="03" name="Orange">
<css-class>orange</css-class>
</color-scheme>
</theme>

(this is the classic theme example)

And last in your css file you set a extra class for the custom color_scheme.

.orange .empnw #heading .customlogo {
background:url(../images/color_scheme/orange/ttw_en_banner.png) no-repeat scroll 0 0 transparent;
}

Regards,
Maarten
thumbnail
prakash harigopal, modificado hace 13 años.

RE: Color schemes - Banner Image not rendered

Regular Member Mensajes: 101 Fecha de incorporación: 23/06/10 Mensajes recientes
Hi Maarten,

Thanks for your reply. I have followed as you mentioned and now am facing one issue like , the image is getting appended with "css" and not able to load the image in the page.

In general for the default scheme image will be formed as

/tickettoworktheme-theme/images/color_schemes/empnw/custom/ttw_banner.png

and for the other scheme (something like empnw) its appending css as follows

/tickettoworktheme-theme/css/images/color_schemes/empnw/custom/ttw_banner.png


Pls find the look-and-feel as follows

	<theme id="tickettoworktheme" name="Ticket To Work Theme">
		<templates-path>/templates</templates-path>
		<images-path>/images</images-path>
		<template-extension>vm</template-extension>
		<color-scheme id="01" name="Default">
			<css-class>default</css-class>
			<color-scheme-images-path>${images-path}/color_schemes/${css-class}</color-scheme-images-path>
		</color-scheme>
		<color-scheme id="02" name="EmpNW">
			<css-class>empnw</css-class>			
		</color-scheme> 
	</theme>


thanks
Prakash.
thumbnail
Maarten van Heiningen, modificado hace 13 años.

RE: Color schemes - Banner Image not rendered (Respuesta)

Regular Member Mensajes: 174 Fecha de incorporación: 5/02/09 Mensajes recientes
I would do something like this:

	<theme id="tickettoworktheme" name="Ticket To Work Theme">
		<templates-path>/templates</templates-path>
		<images-path>/images</images-path>
		<template-extension>vm</template-extension>
		<color-scheme id="01" name="Default">
			<css-class>default</css-class>
			<color-scheme-images-path>${images-path}/color_schemes/${css-class}</color-scheme-images-path>
		</color-scheme>
		<color-scheme id="02" name="EmpNW">
			<css-class>empnw</css-class>			
			<color-scheme-images-path>${images-path}/color_schemes/${css-class}</color-scheme-images-path>
		</color-scheme> 
	</theme>


By doing this the the CSS will will try to find your image like this:
color_scheme 01
/tickettoworktheme-theme/images/color_schemes/default/custom/ttw_banner.png

color_scheme 02
/tickettoworktheme-theme/images/color_schemes/empnw/custom/ttw_banner.png


Regards,
Maarten
thumbnail
prakash harigopal, modificado hace 13 años.

RE: Color schemes - Banner Image not rendered

Regular Member Mensajes: 101 Fecha de incorporación: 23/06/10 Mensajes recientes
Thats perfectly working.
Thank you v much Maarten.

regds
Prakash.
thumbnail
Maarten van Heiningen, modificado hace 13 años.

RE: Color schemes - Banner Image not rendered

Regular Member Mensajes: 174 Fecha de incorporación: 5/02/09 Mensajes recientes
Hi Prakash,

No problem. glad to help out emoticon

Regards,
Maarten
Dinesh Reddy A, modificado hace 10 años.

RE: Color schemes - Banner Image not rendered

New Member Mensaje: 1 Fecha de incorporación: 11/02/14 Mensajes recientes
Hi this is Dinesh.
i need small help regarding the themes in life-ray.
in, my application default color is blue, then i have added green and orange color schemes into my app.
then, if any time wants to change the color im logging with admin, then changing the colors, instead of that how to change the color through application coding level, please let me know ASAP, im trying with last two days.