Skinning System in dnn

Source: Internet
Author: User
Tags dnn

Pair Skinning I have heard of it. However, Dnn This is the first application I have ever used. Skinning Project. The so-called Skinning Is to achieve the separation of functions and appearance. However, due to contact Asp.net Not many. It took a long time Dnn Now Skinning The system has a certain understanding.

In Dnn The so-called skin consists of two parts. That is Skin And Container . Because this is Dnn . For these explanationsArticleA lot. In /Documents/dotnetnuke skinning I think it is clear enough. What I want to write is the page rendering process.

1. First URL Start. This URL Will be Urlrewritemodule Class first. And use Asp.net Supported URL Rewrite the system URL . I have always had a lot of questions about this rewrite mechanism. However, after reading this article, many questions have been solved. Recommendation is the same as I do URL Those who are not familiar with rewriting will read this article. Dnn Of URL Rewriting is almost completed in the standard format of this article.

2. Overwritten URL Will be located on a page, usually Default. aspx Page. The background class of this page is Cdefault . This class The loadskin method loads the skin. The skin path is generally in portalsettings. activetab. skinsrc. Tab is the real page identifier, because almost all pages are dynamically drawn on default. aspx, which can only be distinguished by tab. In the database, we can see that the tabs stores skinsrc and containersrc. In tabmodules, each tab module and its position are saved.

3.In eachSkin, that is, the background class of each skin. ascx is skin. It will retrieve all pages with IDs contentpane, leftpane, rightpane, topane, and bottompane. . (The ID must be unique) and the corresponding iner is retrieved and put in. Add the corresponding module to the control with the ID of contentpane in each iner. In this way, the entire page is drawn.

I thought it wouldLoading skin, container, and module in the background class of default. aspx. However, it only loads skin, and most of the functions are completed in the background class of skin. ascx. I think there is a natural reason for this design. It may be for centralized control. I hope to hear from others.

The biggest inspiration for me is to achieve separation of functional components and dynamic assembly. There must be certain syntax rules. The component is connected by default strings of each other. At the same time, it also has the ability to generate objects from strings or call functions. SlaveYou can see in skinning. Naming rules similar to contentpane must be followed, and the ability of loadcontrol (controlpath as string) as usercontrol to directly load strings into controls is also required. In. net, there are many such mechanisms, such as reflection. The introduction of such a mechanism usually increases flexibility, but it will inevitably pay some price. You need to weigh the advantages and disadvantages based on your needs.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.