Foros de discusión

change portlet-topper only in one portlet

Dax Saw, modificado hace 15 años.

change portlet-topper only in one portlet

Regular Member Mensajes: 165 Fecha de incorporación: 27/03/09 Mensajes recientes
Hello,

I am using Liferay 5.2.2 version.

I want to change portlet-topper only in one portlet. The other save regular css.
I try it on Advanced styling and i add css likie this;
.portlet-topper{
background: #000;
}
it's not working

this one working ok but change all body of this portlet( i want to chande portlet-topper on this portlet)
#portlet-wrapper-47{
background: #000;
}

i try to

#portlet-wrapper-47.portlet-topper{
background: #000;
}
not working

Sorry for my english.
Anybody can help me?
thanks

sawi
thumbnail
Samuel Kong, modificado hace 15 años.

RE: change portlet-topper only in one portlet

Liferay Legend Mensajes: 1902 Fecha de incorporación: 10/03/08 Mensajes recientes
#portlet-wrapper-47 .portlet-topper{
    background: #000;
}
Note the space after 47
Dax Saw, modificado hace 15 años.

RE: change portlet-topper only in one portlet

Regular Member Mensajes: 165 Fecha de incorporación: 27/03/09 Mensajes recientes
thanks. this work exactly how i need
thumbnail
Ziggy R, modificado hace 14 años.

RE: change portlet-topper only in one portlet

Expert Mensajes: 293 Fecha de incorporación: 8/06/08 Mensajes recientes
Is it possible to remove that top bar on a porlet?
whyBish valid, modificado hace 14 años.

RE: change portlet-topper only in one portlet

Junior Member Mensajes: 63 Fecha de incorporación: 10/07/09 Mensajes recientes
For all portlets? or for a portlet type? or for a portlet instance?
For all portlets use a custom theme and change portlet.vm to remove the portlet topper.
thumbnail
Ziggy R, modificado hace 14 años.

RE: change portlet-topper only in one portlet

Expert Mensajes: 293 Fecha de incorporación: 8/06/08 Mensajes recientes
I would like to remove the header bar on a specific portlet instance.
whyBish valid, modificado hace 14 años.

RE: change portlet-topper only in one portlet

Junior Member Mensajes: 63 Fecha de incorporación: 10/07/09 Mensajes recientes
In the custom css for that instance add something like

#myPortletInstanceId #portlet-topper {
display:none;
}

where the myPortletInstanceId is as shown on that page.
thumbnail
Ziggy R, modificado hace 14 años.

RE: change portlet-topper only in one portlet

Expert Mensajes: 293 Fecha de incorporación: 8/06/08 Mensajes recientes
Hi thanks,

I tried that and it worked. Is it possible to do the same for any instance of a specific portlet type. For example, is it possible to remove the header bar on any "search portlet" on any page?

Thanks
whyBish valid, modificado hace 14 años.

RE: change portlet-topper only in one portlet

Junior Member Mensajes: 63 Fecha de incorporación: 10/07/09 Mensajes recientes
If you have a custom theme created (via sdk) then in custom.css put something like:

#portlet-journal-content-search #portlet-topper{
display:none;
}

Where the first part is the portlet type (so if you wanted the other search you'd need to find the class name used in the html).

NOTE: I haven't tried the code above, so you may need to tweak it to get it to work.