I'm building a DotNetNuke 5 module and I was wondering what the best approach is for the following:
I have a stylesheet in my Module-folder "module.css". What is the best way to apply the stylesheet to my modules?
I hav开发者_如何学Pythone some images as well. The only way to refer to the images in my module folder is by refering to "/DesktopModules/MyModule/xxx.png". Can this be done in a more elegant way? (perhaps DotNetNuke.Globals or so?)
Thanks!
Just include module.css in the module folder and DNN will load it on the page where you module is loaded. It has to be module.css though, not some other name, and it needs to be in the same folder as the ASCX file being loaded.
As for images, I typically build out the path for the image based on the PortalAlias then the desktopmodules location.
精彩评论