Give an unique id for every DNN Containers
Monday, October 12th, 2009Inspired 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: