Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SMW0: CSS reference in HTML templates?

Former Member
0 Likes
889

Hello,

I have added some HTML templates in the WEB repository, but these require a CSS file. I don't want to embed the CSS in the HTML code, but just link to the CSS. Is this possible? I take it I'll have to add the CSS file to the repository as well. But how does this work exactly?

If I write something in the HTML templates like this:

<LINK REL="stylesheet" HREF="style.css">

Would the stylesheet be found automatically?

Thanks in advance.

Hello,

I have added some HTML templates in the WEB repository, but these require a CSS file. I don't want to embed the CSS in the HTML code, but just link to the CSS. Is this possible? I take it I'll have to add the CSS file to the repository as well. But how does this work exactly?

If I write something in the HTML templates like this:

<LINK REL="stylesheet" HREF="style.css">

Would the stylesheet be found automatically?

Thanks in advance.

3 REPLIES 3
Read only

athavanraja
Active Contributor
0 Likes
637

which version of R/3 you are using. if you are on WAS6.20 or above , you can store the css in the mime repository (se80) and reference them in your template

Raja

Read only

0 Likes
637

Hi,

Thanks for your answer. I found the solution in the mean time, by adding the css to the WEB repository just like the HTML template.

With the method cl_gui_html_viewer->load_html_document I get the url of the file in return. If I then use a placeholder in the template for the url and replace it with the url I get from the method, it works perfectly.

Read only

0 Likes
637

Dear ,

I have an HTML file in my portal showing the news in a effective way .

Now i want that the HTML file should take the default CSS of portal

Plz suggest me hoe to do that

Regards

Krishan Kumar Yadav