Learn More





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

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Add custom modules to skin templateAdd custom modules to skin template
New Post
5/13/2013 3:40 AM


I have a skin for my dotnetnuke website and want to place my custom modules on that skin page so that I don't have to place the modules myself everytime I create a new page in dotnetnuke. I know that I can select 'place module on every page', but I experienced some issues with that and want to place my modules directly on the skin template.

I included my modules on the skin template like this:
<%@ Register TagPrefix="dnn" TagName="Newsletter" Src="~/DesktopModules/Newsletter/View.ascx" %>
<%@ Register TagPrefix="dnn" TagName="Social" Src="~/DesktopModules/Social/View.ascx" %>

Now when I refresh my page i get this error:

Unable to cast object of type 'System.Collections.Generic.List`1[DataCore.Modules.Newsletter.Components.Item]' to type 'System.Collections.Generic.IEnumerable`1[DataCore.Modules.ContactForm.Components.Item]'.


Why do I get this error message? When I try it with one module it works.

I also have another question about localization of the module in my skin template. I have a resourcekey on a label in my newsletter module:
<asp:Label id="lblSubscribeToNewsletter" runat="server" resourcekey="Submit.Text" />

When I place the module in my skin template the text is not shown. When I place the module on the page myself with dotnetnuke admin then the text is shown. I tried to put the resourcekey in the resource file for the template but that doesn't work. 

Can somebody help me?

New Post
5/13/2013 5:18 AM
Instead of a module you should consider to add a "SkinObject", if you really want to add it to your skin.

On the other hand, you can use a page template that includes the module and use this template when you add a new page.

Best wishes

Michael Tobisch
DNN★MVP - Michael Tobisch's Site about DNN, SQL Server, ASP.Net and other related stuff - The most vibrant community around the DNN-platform
New Post
5/13/2013 5:49 AM

Thanks for your answer. I've made skinobjects of my module now and I don't get the error anymore but my text is still empty on my template. I've added the resourcekey to my skin resource file but this won't work either.

New Post
5/13/2013 6:01 AM
Ok nevermind. This forum item solved my problem:
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Add custom modules to skin templateAdd custom modules to skin template

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.
Try Evoq
For Free
Start Free Trial
a Demo
See Evoq Live
Need More Information?