How to use external style sheet (6.0 platform)

How to use external style sheet (6.0 platform)

  

Hello.

In trying to make an external style sheet visible to my application, I did the following:

  1. First, add your external style sheet as a deployed resource of application:
  • Import Resources: Right Click Data > Resources
  • Select style sheet file
2. Second click Add/remove references…
  • Import the AddStyleSheetTag action of the HTTPRequestHandler extension
  • Set the StyleSheetURL:  “http://localhost/Application/css/TheProgrammingManager"
3. Third, to apply the style sheet to all screens: Add AddStyleSheetTag action to the preparation of the header web block (which is used in all screens).

After doing the above and the elements in my external style sheets were still not visible to my application, I created a ThemeStyleSheet and typed the following information on the page: @import url("http://localhost/Application//CSS/TheProgrammingManager.css");

I still cannot see my external sheet.  What am I doing wrong? Thanks for your assistance.

Gelene Welch 

Hi Gelene,

Have you set the Deploy Action of the resource to Deploy to Target Directoy?



Cheers,
Tiago Simões
Hi Tiago.

Thank you for your prompt response. 

Yes, I did set the Deploy Action to "Deploy to target directory."

I'm currently not near my developer computer; but later tonight I can send my oml file to you if you think it would be helpful.

Regards,
Gelene Welch
Hi Tiago:

I have duplicated my steps for linking to an External Style Sheet in a newly created eSpace ("Application"), which I have attached hereto. See the invocation of the AddStyleSheetTag action in the preparation for the Header web block.  Also see the @import link in the "Application" style sheet. Thanks for your help.

Thank you.
Gelene Welch
Hi Gelene,

I believe you need to change the StyleSheetURL from "http://localhost/TheProgrammingManager.css" to "/YourEspaceName/TheProgrammingManager.css" as the url will need to be resolved by the browser.

Cheers,
Tiago Simões
Hi Tiago,

As you "believe" I should do, I changed the Style SheetURL to "/MyApplication/TheProgrammingManager.css." However, I am still unable to work with my external style sheet.  Are you able to produce a prototype illustrating how to link to an external style sheet and send it to me? If this is an impossible or not-recommended task, let me know so I can move on. 

I appreciate you.

Regards,
Gelene Welch
Hi Gelene,

You can find an example in attachment (just using import).
In the eSpace you have sent there was another issue, the web block was not being used anywhere.

Cheers,
Tiago Simões
Tiago,

Thank you for your patience with me.  I get it! I got it!  I was overthinking the process and becoming more and more frustrated as I tried to resolve my issue. 

I appreciate you much.

Regards,

Gelene