Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

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 ExtensionsModulesModulesMultiple module instance on page but only want to add module CSS and scripts onceMultiple module instance on page but only want to add module CSS and scripts once
Previous
 
Next
New Post
7/3/2010 6:46 AM
 
Hi, as per the message title, we are trying to find a way to only load a modules CSS and script files in the head (CSS) section of the page once if there is more than one instance of the module on a page. At the moment, when more than one instance is on a page, the module will add the same CSS and script files to the head section. Has anyone got any suggestions as to how to overcome this?
Thanks
Dan

Pure Systems
www.puresystems.co.uk
UK: 0844 561 6046
Outside UK: +44 1363 777014
 
New Post
9/4/2011 5:21 AM
 
I know this is an old thread.

If the .css has the 'standard' name ie skin.css then I believe that's taken care of automatically.

For script have you come across the API's

Page.ClientScript.RegisterClientScriptInclude and Page.ClientScript.RegisterClientScriptBlock?


Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
New Post
9/5/2011 6:03 AM
 
Hi

You can set the id of script and css adding to header part from code behind of  your module view page. Then find that control id and assign script and css dynamically.

You can check below link:

http://www.dotnetnuke.com/Resources/Forums/forumid/201/threadid/430146/scope/posts.aspx


Thanks
Sibabrata
Mindfire Solutions
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesMultiple module instance on page but only want to add module CSS and scripts onceMultiple module instance on page but only want to add module CSS and scripts once


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