on 04-01-2014 5:35 AM
Hi experts,
Can you please tell me how to embed CSS file in the HTML Template ??
Below is my Template Code:
`SAP_TopInclude()`
<html>
<head>
`SAP_PageTitle()`
`SAP_Stylesheet()`
`SAP_JavaScript()`
</head>
<body `SAP_BodyAttributes()` onload="`SAP_OnloadJavaScript()`">
`SAP_TemplateHeader()`
`SAP_BodyContentBegin()`
`SAP_FormBegin()`
`SAP_DynproLayerBegin(004,003,002,001)`
`SAP_Label("L1")`
`SAP_DynproLayerEnd()`
`SAP_DynproLayerBegin(015,003,009,001)`
`SAP_Label("L2")`
`SAP_DynproLayerEnd()`
`SAP_DynproLayerBegin(026,003,009,001)`
`SAP_Label("L3")`
`SAP_DynproLayerEnd()`
`SAP_DynproLayerBegin(037,003,008,001)`
`SAP_Label("L4")`
`SAP_DynproLayerEnd()`
`SAP_DynproLayerBegin(002,004,045,005)`
`SAP_TableControl("%#C_101")`
`SAP_DynproLayerEnd()`
`SAP_DynproLayerBegin(002,004,001,001)`
`SAP_InputField("WA_MSEG-RB1")`
`SAP_DynproLayerEnd()`
`SAP_DynproLayerBegin(002,009,009,001)`
`SAP_Button("B2")`
`SAP_DynproLayerEnd()`
`SAP_DynproLayerBegin(012,009,015,001)`
`SAP_Button("B1")`
`SAP_DynproLayerEnd()`
`SAP_DynproLayerBegin(044,009,001,001)`
`SAP_Button("B4")`
`SAP_DynproLayerEnd()`
`SAP_DynproLayerBegin(046,009,001,001)`
`SAP_Button("B3")`
`SAP_DynproLayerEnd()`
`SAP_FormEnd()`
`SAP_BodyContentEnd()`
</body>
</html>
Regards,
Aayush Aggarwal
Hi Ayush,
Please follow the below steps:
1. Add the css file as a MIME object.
2. Add the the following in the <head></head> tag:
<link rel="stylesheet" href="`mimeURL(~service="itsmobile", ~theme=99, ~language="", ~name="YourCSSFilename.css")`" type="text/css" />
Note: If you have created folders in the MIME Object folder, give the entire path starting from the foldername immediately below the MIME Object folder, until your CSS file. For example:
Then instead of just writing "YourCSSFilename.css", write "styles/all/abc.css".
Let me know.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Aayush,
In continuation to Oisin's reply, Or you may use:
~service=~current_service
Also, we generally check the original parameter given for the internet service first before adding the CSS link as:
` if ( ~itsmobileCssInclude != "" )
<!-- customer include from gui settings -->
` <link rel="stylesheet" href="`mimeURL(~service=~current_service, ~theme=~theme, ~language="", ~name="style.css")`" type="text/css" />
` else <!-- default include from itsmobile --> `
<link rel="stylesheet" href="`mimeURL(~service="itsmobile", ~theme=09, ~language="", ~name="mobile.css")`" type="text/css" />
` end;`
Let me know if this helps.
Thanks,
Utkarsha
Hi Utkarsha,
Your answer is helpful but I am still not able to embed CSS in the HTML Template in ITS. Can you please guide me some more.
Regards,
Aayush Aggarwal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.