Plugin Developer Discussion

Discussion for FogBugz Plugin developers

How to download custom CSS file on IPluginRawPageDisplay

I am displaying some custom content on a raw page using IPluginRawPageDisplay. I want to apply my custome CSS file (that i added to my project using IPluginStaticCSS).

How can i tell my page to download that CSS file?

Thanks
Nikhil Singhal Send private email
Wednesday, November 18, 2009
 
 
Hi Nikhil-
Probably IPluginStaticCSS is the simplest way to accomplish this -- have a look at that interface.
Thanks!
Brett
Brett Kiefer Send private email
Wednesday, November 18, 2009
 
 
I was able to add the CSS file. My question is that when i am using it on raw page, my css file is not getting downloaded.
Nikhil Singhal Send private email
Wednesday, November 18, 2009
 
 
Hi Nikhil-
Oh, got it. The Raw page doesn't include any of the usual page goodies. I think what you want is to use api.Url.PluginStaticFileUrl to get a path for FogBugz to serve your static file. Then you can include that explicitly as the Workflow plugin does for its editor (this is wasabi, but you get the idea):

<link rel="stylesheet" type="text/css" href="<%=HtmlAttributeEncode(api.Url.PluginStaticFileUrl("styles.css"))%>" />

Is that what you're looking for?
Thanks!
Brett
Brett Kiefer Send private email
Wednesday, November 18, 2009
 
 
Thanks again Brett. That solved the issue.
Nikhil Singhal Send private email
Wednesday, November 18, 2009
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz