voyent
Problem with including <style> tag to override the style for a prticular page  XML
Forum Index -> Portals & Portlets
Author Message
eager_to_learn

Joined: 05/Jun/2008 00:00:00
Messages: 15
Offline


Hi,


I am using ICEFaces to develop a portal.I want to include a <style></style> tag just like in JSP to override some style for a particular .jspx page.

Can anybody help me??
[Liferay 4.4.2, ICEfaces 1.7]

Thanks,
GR

Rajesh
patrick.corless

Joined: 26/Oct/2004 00:00:00
Messages: 1982
Offline


You shouldn't have any trouble doing this for your portlet. Check out the component showcase portlet sample. There is a good example of how to add custom CSS.

If you want to over ride a portal theme then you'll have to look more closely at the Liferays api for theming.
[Email]
deryk.sinotte


Joined: 26/Oct/2004 00:00:00
Messages: 1008
Offline


There is an <ice:outputStyle> component for doing this sort of thing. As Patrick mentions, there are examples in the portlet version of Component Showcase.

Deryk Sinotte
Team Lead
ICEsoft Technologies, Inc.
thorne

Joined: 10/Jun/2008 00:00:00
Messages: 12
Offline


I have an issue with the stylesheet portion in a portlet. I'm using Liferay 5.1.1 JBoss 4.2.2 and ICEfaces 1.7.1. When I deploy the portlet its working fine but the <ice:outputStyle href="resources/portlet-custom.css"/> file that I'm adding doesn't seem to work.

When I analyzed the page with Firebug and looked at the CSS file with it I just get a message saying that no CSS rules are defined.

Here is the CSS file:
Code:
 td.treeColumn {
     width:200px;
 }
 
 td.instanceListerColumn {
     width:300px;
 }
 
 tr.instanceListerRow1 {
     background-color:#CCCCFF;
 }
 
 tr.instanceListerRow2 {
         background-color:#CCFFFF;
 
 }
 


Anyone have an idea why this isn't working?

All good things lead to more good things
[Email]
deryk.sinotte


Joined: 26/Oct/2004 00:00:00
Messages: 1008
Offline


You might want to try an absolute reference as portlets don't tend to like relative references:

Code:
<ice:outputStyle href="/resources/portlet-custom.css"/>

Deryk Sinotte
Team Lead
ICEsoft Technologies, Inc.
 
Forum Index -> Portals & Portlets
Go to:   
Powered by JForum 2.1.7ice © JForum Team