Are you developing a new skin in DotNetNuke and need additional properties in Skin class? Let's look into how skinning works.
if you look at the top of the every skin, you will find following
<%@ Control Language="vb" Codebehind="~/admin/Skins/skin.vb" AutoEventWireup="false"
Explicit="True" Inherits="DotNetNuke.UI.Skins.Skin" %>
Please see the strong part of the above code. You will find that every skin that we develop in dnn is inherited from DotNetNuke.UI.Skins.Skin.
Ok so now is the time to introduce a new property to the class. Just create a new class like following:
public class MySkinBase : DotNetNuke.uI.Skins.Skin
{
private string _newOne;
public string NewOnw
{
get { return _newOne;}
set { _newOne = value; }
}
}
All you should do next is to use this class in place of DotNetNuke.UI.Skins.Skin in developing your skin like following.
<%@ Control Language="vb" Codebehind="~/admin/Skins/skin.vb" AutoEventWireup="false"
Explicit="True" Inherits="MySkinBase" %>
And you will now get a property NewOne into your skin object development. Enjoy!
Subscribe to:
Post Comments (Atom)
Popular Posts
-
Hi all, Creating a modal popup for asp.net users is always easy, its simply a modal panel, modal popup extender of asp.net ajax and all is ...
-
// using DotNetNuke.Entities.Portals; // using System.Collections; PortalAliasController paController = new PortalAliasController(); PortalA...
-
I was configuring one of our clients farm which required FBA on different web applications (around 5) and he wanted each web application sho...
No comments:
Post a Comment
Please add your valuable comments about this post if it helped you. Thanks