Products

Solutions

Resources

Partners

Community

About

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesModule ThemesModule Themes
Previous
 
Next
New Post
3/20/2012 5:00 AM
 

I am writing a module and would like to offer themes. Allowing the user to choose a theme and store the value should be no problem, but what do I do with it? I know that css files are listed in the html headers, but how do I inject mine for the given theme? Not sure how to approach this.

 
New Post
3/20/2012 5:51 AM
 
you may include a module.css in your dsktopmodules/[modulename] folder, which will be loaded automatically. besides you may use HTML or XSL templates to provide admins with options for layout modification.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
3/20/2012 6:00 AM
 
I am using module.css in the module's folder and it works good. I have seen other modules that use themes and they store the admin's choice in some kind of xml. Is there a link to how this works? I have searched the net but can't find anything.
 
New Post
3/28/2012 10:10 PM
 

The best way is to use the new Client Resource Management API in DNN 6.1+.

ClientResourceManager.RegisterScript(BasePage, pathtocss); 

 If you need to support older DNN, you can use something like:

string key = Path.GetFileName(pathtocss);
            if (!BasePage.ClientScript.IsClientScriptBlockRegistered(key))
            {
                BasePage.ClientScript.RegisterClientScriptBlock(typeof(Page), key, "<script type=\"text/javascript\" src='" + GetModulePathWeb(pathtocss) + "'></script>");
            }

Thanks,

Mike

 
New Post
3/31/2012 11:50 AM
 

Thanks digmike,

That is just what I needed. Now I just need to figure out how to get jQuery themes working... I can't get past DNN's jQuery theme.

 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesModule ThemesModule Themes


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out