Skip to Content
author's profile photo Former Member
Former Member

Apply a custom style sheet to the web pages.

I have created custom page layout by changing the jsp and xml files. Now I want to use a custom style sheet.

I have uploaded my custom style sheet at "etc/wpceditor/css/runtime/myfile.CSS"

I don't know how to test if my page layout is using this style sheet (myfile.css). ???

How should I link my custom page layout to this style sheet (myfile.css) ?

I have also tried to include the myfile.css in my project (par) changed the jsp file

<%@ page import="com.sapportals.portal.prt.component.IPortalComponentResponse"%> 
<%@ page import="com.sapportals.portal.prt.resource.IResource"%>
<% IPortalComponentResponse componentResponse = 
		(IPortalComponentResponse)pageContext.getAttribute(javax.servlet.jsp.PageContext.RESPONSE);
	IResource myfile = componentRequest.getResource(IResource.CSS, "css/myfile.css"); 
	componentResponse.include(componentRequest, myfile); %>

Can you tell me how to test if am using the style sheet myfile.css ?

Thanks

Srinivas

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Feb 27, 2009 at 08:52 AM

    Hi Srinivas,

    The WPC by default refer the CSS file stored at etc/wpceditor/css/runtime/ .

    And if u want to put the reference of CSS file in JSP(of the layout) then use following code

    <LINK REL="stylesheet" HREF="irj/go/km/docs/etc/wpceditor/css/runtime/myFile.css" />

    _Vishal

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 27, 2009 at 06:27 AM

    I think you can directly use your CSS in JSP page.

    <link href="/styles/default.css" rel="stylesheet" type="text/css" />

    No need to read it as resources. in Par file.

    To test your CSS is working or not. Change background color or any other visible element in to black. and execute run your PAR application. If the background color changes that means your CSS is applied.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.