开发者

Dotnetnuke reference images and stylesheet

开发者 https://www.devze.com 2023-03-06 07:03 出处:网络
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 stylesh

I'm building a DotNetNuke 5 module and I was wondering what the best approach is for the following:

  1. I have a stylesheet in my Module-folder "module.css". What is the best way to apply the stylesheet to my modules?

  2. 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消