(sorry for the repost, really need the answer)
(updated: saw the event module, mctl is used, but I prefer an easier way)
I am really stuck with this problem these days, anyone has good solution.
Problem: one module has serveral controls, use custom skin for the "main" view, use editURL to go to other controls, then the skin will change to admin/default skin, always.
cause:
=====================
The reason users don't see additional modules in the edit text screen is because DotNetNuke checks the URL for a parameter "ctl". If DotNetNuke sees the parameter "ctl" in the URL, it will do two things: Load only the module that has it's module ID in the URL (represented by mid in the URL), and the other is loading the module in the assigned Admin Skin set in Site Settings under the Appearance section. While this is fine for the Text/HTML module, this can cause confusion in some modules where the page assigned skin may be drastically different from the assigned Admin Skin for the site.
========================
From: www.apptheory.com/dotnetnuke/dotnetnuke_blogs/ctl/articleview/mid/1002/articleid/141/avoiding_the_dotnetnuke_admin_skin.aspx
Solutions I got and tried:
1. change admin skin, this is not good because we have several modules with different custom skin
2. use skinSrc and ContrainerSrc, this solvers the problem temporily, but when the page has a postback, e.g., click one button to show something, the page refreshed and the admin/default skin appeared AGAIN!
also, for every editURL, we have to add the querystring (?skinSrc=...), very annoying...
3. the method where the efficon article module used, seems to be good, but when view a news article in "another page", admin skin is used too, so this is not the best
4. the guy in AppTheory suggested:
http://www.apptheory.com/dotnetnuke/dotnetnuke_blogs/ctl/articleview/mid/1002/articleid/141/avoiding_the_dotnetnuke_admin_skin.aspx
========================
To avoid this, module developers need to create a way to dynamically load the control themselves instead of relying on the DotNetNuke framework. To accomplish this, developers should set the initial "View" control to a dispatch page that determines which interface to load based on what parameters are in the URL. At AppTheory, we often use the parameter "mctl" and then have our 'dispatch' page check for this parameter in the URL. If the parameter doesn't exist, we simply dynamically load the control that would have been set as the initial view control for the module. If the parameter does exist, we check the value for "mctl" and load whatever interface we have that corresponds to the mctl parameter in the URL....
=============================
seems to be perfect, but are there any sample code or hints?
5.maybe the best solution:
in the control page_load or page_init, portalsettings.activetab.skinSRc to set the skin, but testing not good. seems that the DNN framework (default.aspx) takes the control..
ANY SUGGESTIONS?