cancel
Showing results for 
Search instead for 
Did you mean: 

Using Custom CSS Elements

MarkusKlein
Active Contributor
0 Kudos

Hello,

i want to add own elements into a theme css file and use it in a jsp file (part of a portal archive). So im wondering if this is possible and how this will affect the sap portal theme editor?

regards,

Markus

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Markus,

as I understand, you are changing code of the top level navigation par file too. Is that right?

Even if not you could deploy your own par file for your top level navigation and include your own css files with it. But that way you will of course not be able to edit these css properties in the theme editor.

But as far as I understand the documentation there is no (standard) way to change the theme editors behaviour or how it handles the css files that it generates.

With the following Code you can include css files with your par file:

-


<%@ page import = "com.sapportals.portal.prt.component.IPortalComponentRequest" %>
<%
IResource myCss = componentRequest.getResource(IResource.CSS, "css/my.css");
currentResponse.include(componentRequest, myCss);
%>

----


The above used path is relative to the root folder in the par file. The css files should be located in the subfolder css.

I am using this way in my own project and it works well.

Kind regards,

Roland

MarkusKlein
Active Contributor
0 Kudos

Hello Roland,

i did pretty much what you have said and it does work for me as well. Its just when you use your own css file your "layout" is kinda hardcoded for any user and the "personalization" feature of the portal doesnt pay off.... But obvioulsy there isnt any other solution...

regards,

Markus

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Piyush,

I also want to add own elements into a theme css. I would appreciate if you could email the documents to me as well.

Thanks in advance.

Regards

Phoay

Former Member
0 Kudos

You cannot edit original SAP theme files but what you can do is...download the original theme file and then make changes to CSS etc (the way u want) and then upload the new theme and make that as default.

I have some documents on how to change themes which I can mail to u if u want.

Regards,

Piyush

ps: please mark useful answers.

MarkusKlein
Active Contributor
0 Kudos

Hello Piyush,

i would appreciate if you could email them to me

thx in advance!

regards,

Markus

MarkusKlein
Active Contributor
0 Kudos

Hello,

lets say i add new css elements (classes) to the css file, how would this affect the portal theme editor? Would i be able to customize my new elements as well?

regards,

Markus

Former Member
0 Kudos

Hi Mark,

I will send that.

Meanwhile you can also see this ..will be useful..

http://help.sap.com/saphelp_nw04/helpdata/en/2f/0f9e4a815bf449bf35537b2ea0aae3/frameset.htm

Regards,

Piyush

ps: Please award points if you find this information useful.

Former Member
0 Kudos

I got some more information for you

http://help.sap.com/saphelp_nw04/helpdata/en/1a/d7c1617dd29e4d85064b467636fada/frameset.htm

Hope that helps. I will look for the document in my machine and send but I guess this is itself very useful.

MarkusKlein
Active Contributor
0 Kudos

Hello Piyush,

thanx for your links. But i do know all this. I need informations or better hands-on experience which goes beyond the just using the theme editor stuff.

Basically what i wanna do is editing the Top Level Navigation (com.sap.portal.navigation.toplevel.par -> toplevelnavigation.jsp). Unfortunatelly the standard css classes arent sufficent for my design wishes so i wanna add new classes and use them in my JSP file.

I just dont know how to do this right now. I do have downloaded a custom thenme (Exported it). It does include some interesting files named default.properties, ie6.properties etc. This seem to be the content files for the theme editor, but they are definitely not standard css files...so im kinda lost how to approach this.

regards,

Markus

Former Member
0 Kudos

Hi Markus,

Hang on. I am just about to send you some useful information.

Hope that will help.

Regards,

Piyush

ps: please mark if you find the information useful.

Former Member
0 Kudos

Markus,

I have just send you 3 docs which I guess is what you are looking for.

Thanks,

Piyush

MarkusKlein
Active Contributor
0 Kudos

Thanx, i got them. I will take a look

Former Member
0 Kudos

Yes. I got it from your business card.

========

From: Piyush Kumar

Sent: Fri 5/19/2006 16:37

To: klein@abs-team.de

Subject: regarding themes

==========

Regards,

Piyush

Former Member
0 Kudos

Do let me know if this is what you were looking for ? If not, I can search some more.

MarkusKlein
Active Contributor
0 Kudos

If you have more documents on creating/modifying own Portal Componets, please feal free to send them all

Anyway, why for god shake are the CSS files not included when you export/download a Theme from the portal. Just these *.properties files are getting downloaded...

Markus

Former Member
0 Kudos

Yeah I will send some more.

I did it myself and realized it stores these value files in a property file. But, why do you require CSS files for themes ? You can change the images etc or change properties using theme editor itself.

If you want to use the themes for iViews then I assume you will write your own components which you will use for creating iViews. For each component, you can have your own css files in the component par file itself. Hope that clarifies.

Regards,

Piyush

ps: please mark helpful answers.

MarkusKlein
Active Contributor
0 Kudos

Hi Piyush,

i want to have round corners at my Top-Level Navigation tabs. And i want to achive this not by using graphics for the rounded cornes, but by simple html and css classes (It is possible!). So i need to add new classes to the used css file for the top-level component.

The com.sap.portal.navigation.toplevel.par does include 2 css files:

- p60hpt_ie55.css

- p60hpt_nn62.css

The question is are these file actually used? Because i do not see how this does fit in with the theme concept? If these 2 css files are used they would be used theme spanning. So i assume these files are just dummies. If these 2 css files are not used, which ones are? And how can i get a hold on them? Do i really need to go to the filestructure of the server and copy them to my computer? Cant i download them from the portal somehow?

I hope it is more clear now, what i wanna achive

regards,

Markus

Former Member
0 Kudos

Yes Markus,

It's bit clear now. I will check things on my installation and get back to you.

Regards,

Piyush

Former Member
0 Kudos

hi Markus - have you ever found out if there is a better way to change the CSS files in the Portal instead of using the Portal theme editor? I am trying to create some 3D looking buttons for a WebDynpro application that executes in the Portal and I need to set the boder style to inset/outset.I also want to change the style of the button based on the mouse button being pressed and released. the Portal theme editor does not do any of that.

Thanks in advance,

Tiberiu