Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7598687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T22:28:17+00:00 2026-05-30T22:28:17+00:00

We are adding some FAQs to multiple portals within our DotNetNuke site using an

  • 0

We are adding some FAQs to multiple portals within our DotNetNuke site using an HTML editor module. The layout and styles will be the same on every portal, so I’m trying to determine the best place to store the custom CSS styles and jQuery within DotNetNuke (ver 5.6) so we can reference them within the HTML editor module for all portals.

Although adding the CSS styles to the Portals/_default/default.css file works, its my understanding that I don’t want to change this file in the event that we update the CMS to the newer version which would overwrite the CSS… right?

If that is the correct approach, is there a similar file for global .js files where we could store the jQuery? I’m also hesitant to include a script reference in the Default.aspx page for the same reason.

Thanks

EDIT: I added the styles to the above referenced default.css page, and added a script tag to the Default.aspx page to a .js file I put in Resources/Shared/scripts/. It seems to be working well… if anyone wants to add their two cents I’d like to hear if there’s a better approach. It seems adding documentation for anyone else who might touch this site in the future could get old unless this is a common practice.

EDIT2: I ended up just adding a style and script tag to the Default.aspx page that references a CSS and a JS file, both stored in the corresponding Resources/Shared/ directories (rather than editing the default.css file).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T22:28:18+00:00Added an answer on May 30, 2026 at 10:28 pm

    There isn’t really a place in DNN for global, custom content that spans portals, unless its in a module or other extension. In this case, it sounds like your portals may have the same skin, so that would be a good place to put custom styles and script (assuming that you own/control the skin; if it’s 3rd party and you might update it, it’s probably best to be off-limits, like the core code).

    So, either add the CSS and script to the skin, or create a custom module which adds the styles/scripts, which you can include on every page (using the Display on All Pages module setting).

    If you’re using DNN 6.1 or later, you can plug into the Client Resource Management framework that was introduced, to manage references to CSS & JS. First, add this reference to a control (skin, module control, etc):

    <%@ Register TagPrefix="dnn" Namespace="DotNetNuke.Web.Client.ClientResourceManagement" Assembly="DotNetNuke.Web.Client" %>
    

    Then use it like this:

    <dnn:DnnJsInclude runat="server" FilePath="DNNMega/jquery.dnnmega.debug.js" PathNameAlias="SkinPath" />
    <dnn:DnnCssInclude runat="server" FilePath="DNNMega/dnnmega.css" PathNameAlias="SkinPath" />
    

    Otherwise, your best bet for adding a stylesheet would be the following code:

    protected override void OnInit(EventArgs e) {
        base.OnInit(e);
        this.AddStyleSheet("//fonts.googleapis.com/css?family=Rokkitt:400,700");
    }
    
    private void AddStyleSheet(string path)
    {
        ((CDefault)this.Page).AddStyleSheet(DotNetNuke.Common.Globals.CreateValidID(path), path);
    }
    

    And the script can be referenced via a simple <script> tag, or something like ClientScriptManager.RegisterStartupScript.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are working on adding some Facebook Connect functionality to our site. Part of
I was thinking of adding some Achievements to our internal bug-tracking and time logging
I'm adding some functionality to my site so that users can upload their own
I'm adding some attributes from live to staging for testing purposes, I'm using ldifde:
I'm planning on adding some flot charts to my site, and i'm wondering are
I'm dynamically adding some li s to an unordered list using jQuery. They are
We are adding some stored procedures to our product that can be called by
I am adding some more depth to the application by supporting multiple methods for
I am adding some script using the StringBuilder. The script is as shown below.
I am working on adding some nagios alerts to our system -- some of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.