Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...ContentPane in a Skin ControlContentPane in a Skin Control
Previous
 
Next
New Post
4/20/2009 11:19 AM
 

Is it possible to put a Content Pane inside a skin control.  I have created a skin control that displays several floated images and some textual content pulled from an external database.  I need to put a content pane right in the middle of it.  I have tried putting a div there like I normally would in a skin definition but DotNetNuke does not seem to be recognizing it when it is embedded in a skin control.

 

<div id="OfficeHeaderPane" runat="server" class="OfficeHeaderPane" />

 

Is there another way to declare a content pane that might be recognized?

 
New Post
4/20/2009 1:47 PM
 

Tim-
Is this for a custom skin for your own use or are you creating a generic skin control to package for others to use (across different skins)?

One option:
If your skin control "surrounds" the content area (as you described) you might do better to re-define the visual portions of your skin control as empty container elements in your skin (not in the skin control) and have your skin control dynamically fill those containers by ID reference.  Your skin control will not itself have any graphic elements to it -- it simply assigns appropriate CSS/content to existing page elements (the empty elements).
 
To put it another way:  think of the empty container elements as your skin-within-a-skin and your skin control as your specialized content manager.  Together, the two make something similar to a mini version of a site skin and DNN.  Note that this approach tightly integrates your skin control with its host skin so it's not a good generic solution if you intend to leverage the control across many skins.
 
-mamlin


esmamlin atxgeek.me
 
New Post
4/22/2009 3:58 PM
 

This is for a set of custom skins, approximately 10 at this time, for our internal use across approximately 150 child portals, but this is constantly expanding.  So I don't think your solution will work for us.

Right now we don't envision having anything in that content pane except for a Text/HTML module that the site administrators could edit their text in.  I may have to change it from a skin control to a module with edit capabilities for an embedded text area instead of a full blown Text/HTML module.

Any other ideas?

 
New Post
4/23/2009 7:12 PM
 

Hi,

Brief explanation of a hack we use:

- DNN looks at server controls directly under the skin control to find available panes
- Those controls must be of one of these types: td, div, span, p
- DNN will not look for panes in nested server controls, such as controls inside a skin object

However... (this works in DNN 4.9, not tested in DNN 5):

- You can dynamically register Panes with the ActiveTab.Panes collection to add panes that are defined in nested server controls
- The pane control must be of a supported type (td, div, span, p) with the runat="server" attribute
- When you register the dynamic pane, you must use the UniqueID of the dynamic pane control, relative to the skin object:

string relativeUniqueId = MyNestedPaneControl.UniqueID.Substring(MySkin.UniqueID.Length + 1);
PortalSettings.ActiveTab.Panes.Add(relativeUniqueId);

- You will then be able to add modules to this pane using standard functions, such as the 'add module' from the control panel

Limitations:

- the pane name will look somewhat ugly in the panes dropdown list at the top (the pane name will be the relative unique ID, such as MyContainer$MyPane)
- layout mode will not show this dynamic pane (but view and edit will work fine)
- this may break in future versions of DNN (not tested in DNN 5 as mentionned)

Ideally...

- DNN should provide a mecanism to create dynamic panes...
- That would enable to create more usable "presenter" controls, such as tab presenter, accordion presenter, where we could add modules to dynamically created panes

I hope this hack can help you out...

Etienne

 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...ContentPane in a Skin ControlContentPane in a Skin Control


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out