DotNetNuke Modules - Collapsible Panels
Last week we looked at how to add the ability to collapse a container as part of the DotNetNuke skinning series. Today, we are going to take a look at how to add a similar feature into the modules themselves.
By the way, while it might work for a person interested in skinning to skip the series on creating modules, I think those of you interested in building modules really ought to take a look at the skinning series.
To get a panel to expand and collapse, we need to use the SectionHeadControl. You can register this control in your module by placing the following code at the top of your ASCX page:
<%@ Register Src="~/controls/SectionHeadControl.ascx" TagName="SectionHead" TagPrefix="DNN" %>
The code to use this control looks something like:
<DNN:SectionHead CssClass="Header" runat="server" ID="m_sectionHeadImageSection" IsExpanded="false" Section="m_ImageSection" Text="Some Label Text Here" />
The Section attribute points to the ID of the section that wraps around the content you want to hide or show. This should not be a control with the runat=”server” attribute assigned to it.
Here is a full list of attributes that you have available:
| Attribute | Description |
| IncludeRule | True or False. True shows a horizontal rule (HR tag) under the text. |
| IsExpanded | True or False. Controls the initial state of the panel being controlled. |
| MaxImageUrl | Overrides the default image for maximize |
| MinImageUrl | Overrides the default image for minimize |
| Section | Points to the control this control is going to expand and collapse. |
| Text | The text to display at the location where this control is regardless of the expanded or collapsed state of the control it is pointing to. |
| ResourceKey | For localization as we’ve discussed before |
Other post in DotNetNuke - Module Development
- Creating DotNetNuke Modules - May 20th, 2008
- Creating DNN Modules - The Tools - May 22nd, 2008
- DotNetNuke Modules - Foundational Concepts - May 26th, 2008
- DotNetNuke Modules - Install DNN into VS 2008 - May 27th, 2008
- DotNetNuke Modules - Creating Base Modules - May 28th, 2008
- DotNetNuke Modules - Registering Your Module - May 29th, 2008
- DotNetNuke Modules - Where Stuff Shows Up - June 3rd, 2008
- DotNetNuke Modules - Benefits of Architecture - June 4th, 2008
- DotNetNuke Modules - Anatomy of the View - June 9th, 2008
- DotNetNuke Modules - Adding Actions - June 11th, 2008
- DotNetNuke Modules - DNN Controls - Label - June 18th, 2008
- DotNetNuke - Internationalization - June 25th, 2008
- DotNetNuke Modules - Internationalization (part 2) - June 30th, 2008
- DotNetNuke Modules - Labels w/ no Help - July 9th, 2008
- DotNetNuke Modules - LinkButtons - July 14th, 2008
- DotNetNuke Modules - Collapsible Panels - July 16th, 2008
- DotNetNuke - The Data Layer - Installing CodeSmith - July 22nd, 2008
- DotNetNuke - Modules - Creating The Tables - July 24th, 2008
- DotNetNuke - Modules - Creating Stored Procs - July 29th, 2008
- DotNetNuke - Modules - Portal Specific Modules - July 31st, 2008
- DotNetNuke Modules - Data Access Layer - August 5th, 2008
- DotNetNuke Modules - Data Access Layer - August 7th, 2008
- DotNetNuke - Data Access Layer Alternative - August 12th, 2008
- DotNetNuke - Modules - Linking within the module - August 14th, 2008
- DotNetNuke - Make Your Module Searchable - August 19th, 2008
- DotNetNuke Modules - Making Content Portable - August 25th, 2008
- DotNetNuke Modules - Exceptions the DNN Way - September 2nd, 2008
- DotNetNuke Modules - PortalModuleBase - September 4th, 2008
- DotNetNuke Modules - Inter Module Communication - September 9th, 2008
- DotNetNuke Modules - Finding The Page a Module is On - September 15th, 2008
- DotNetNuke Modules - Caching - September 17th, 2008
- DotNetNuke Modules - Module Settings - September 22nd, 2008
- DotNetNuke Modules - Retrieving Settings - September 24th, 2008
If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!



















































