MyLifeBBS

The world with no boundaries

  • Home
  • Google Apps
  • DotNetNuke
  • Things in The Internet
  • SEO
  • Contact Me

Give an unique id for every DNN Containers

October 12, 2009 by George

Inspired by Think of Design’s avoid span in module title and amount of requests including myself to have a unique id for every containers in DotNetNuke, I’ve came out with this simple solution to ease the designing works in DotNetNuke Skinning.

<!-- From thinkofdesign.com -->
<%@ Control language="vb" AutoEventWireup="false" Explicit="True" Inherits="DotNetNuke.UI.Containers.Container" %>
 <%@ Register TagPrefix="dnn" TagName="TITLE" Src="~/Admin/Containers/Title.ascx" %>
 <%@ Register TagPrefix="dnn" TagName="Actions" Src="~/Admin/Containers/Actions.ascx" %>
 
 <dnn:title runat="server" id="dnnTitle" visible="false" />
 <% Dim ModuleTitle As String = GetPortalModuleBase(dnnTitle).ModuleConfiguration.ModuleTitle %>
 
 <div class="common">
 <h3><%= ModuleTitle %></h3>
 <dnn:Actions runat="server" id="dnnActions" />
 <div id="ContentPane" runat="server" />
 </div> 

Using the same logic, we can retrieve the module id by modifying the DNN property code:

<% Dim ConModule As DotNetNuke.Entities.Modules.ModuleInfo = DotNetNuke.UI.Containers.Container.GetPortalModuleBase(Me).ModuleConfiguration %>
<div id="Container<%=ConModule.ModuleID %>" class="PekoOutterCon con180">

Theoretically, all you need to do is to change the .ModuleTitle to .ModuleID. Since CSS id cannot start with a number, you will need to add some word before calling out the ModuleID in the div.

However, you will find that if you logout from DNN, the module will failed to call out the correct ModuleID.

Thus, you will have to define that correct container and ModuleInfo.

Now you can change the individual container without interfering with other DNN Container.

Filed Under: DotNetNuke Tagged With: Unique Container ID

Recommended DNN Modules

SiteGround Hosting Fast and Reliable WordPress hosting that we recommend.
XMOD Pro is a very good module to create complicated forms with external database writing. You could use it to build a simple module as well. The drawbacks like custom permission and filtering might be an issue though.
Ultra Video Gallery is a very advanced multimedia module which allows you to create a site near to YouTube. It allows you to convert video directly in the website, share it, comment, membership integration and so on.
Project Management Templates, This is not a DNN module but if you need to manage your works better, try the project management templates. It helps a lot.

Post Archives

Blogroll

  • Food Promotions in Kuala Lumpur GoEatOut Promotion Page

Recommended Sites

  • DNN Store is the best place to shop for DNN modules
  • Malaysia Food Guide Best place to find malaysia food promotions and place to eat.
  • Malaysia Public Holidays A site that list out all public holidays in Malaysia with lunar calendar too

Recent Comments

  • kenny on How to modify DNN 6 login module skin design – Quick Guide
  • michelle on Turn back On Windows 8 Wifi – 100% works
  • Oracle9 on Turn back On Windows 8 Wifi – 100% works
  • AK on Turn back On Windows 8 Wifi – 100% works
  • Customizing the DotNetNuke login page : Karl’s Place on DotNetNuke Customizing your Login – PART 3

About the Author

I'm the founder of InnoChannel Sdn Bhd. We're here to help people to market their business online and also a Google Apps Premier Partner in Malaysia who provides email consultation, setup, data migration and so on.

Copyright © 2025 · News Pro Theme on Genesis Framework · WordPress · Log in