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

HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Consistent header/footer without nested skins?Consistent header/footer without nested skins?
Previous
 
Next
New Post
9/20/2006 2:51 PM
 
I jumped into DNN a few days ago, so I'm still very much learning.

My site is currently asp.net using nested master pages.
The top level master page includes a header and a footer control to manage navbar / login / ad placement / etc.

I have about 7 or 8 main varieties of pages currently, all with the same header & footer but varied layouts of the mid section. The mid section utilizes a variety of user controls and I understand how to simply wrap these as modules.

It's clear to me how a skin defines the layout of the page, and how I can customize the layout of panes by making a few skins. However since skins do not support nesting, it appears to me that I have two options to choose between:
(1)Use multiple skins and have them duplicate the header/footer layout, leaving me prone to bugs if anything changes.
(2)Use one skin and one layout, which means I'll need to use modules to group my existing user controls together in whatever layout I desire. Essentially turn each page layout on my current asp.net 2.0 site into one module.
(3)Edit default.aspx to either make it use a master page, or else hard code a reference to my header/footer controls.

None of these seem perfect.
Option 1 is bug prone as I mentioned.
Option 2 seems like somewhat weak architecture.
Option 3 means I either duplicate default.aspx (kind of ugly), Or force that every page across the site *must* use the header & footer. Currently this would be ok, but I don't like the idea of painting myself into a corner like that.

If I could nest skins, I could have the parent skin lock in place everything I want to be the same across my page layouts. I really like the approach of mapping one user control to one module, and this would let me define the layout of the panes with each skin (makes great sense).

Is there some other approach that folks typically use for this that I am unaware of?

Thanks!
Adrian
 
New Post
9/20/2006 7:43 PM
 

Adrian, welcome to DNN!
As you suspected, DotNetNuke doesn't inherently have the nesting capability you are looking for. 
Here's my $0.02 -
You can make a skin using your graphics and header/footer, with one content pane - and use it for your "Admin" skin.
This skin will be used for login/out, admin settings, etc. and it would consist of three tables - header, content area and footer.
Build it and test it, get the header and footer working/looking exactly the way you want.
From there, duplicate this 'Admin' skin and change only the content area.

As far as "if anything changes" - don't worry, it will!  But the dotNetNuke core team is good about including backward compatibility.

Option 2 is actually how DNN works.  Functionality is built into modules.
Option 3 means you'd have to re-write default.acpx on every code update - avoid this if possible. 

Does this make sense?

 
New Post
9/21/2006 4:15 AM
 

I once got a tip from a collegue who had good results with "file includes" in a skin .ascx file. In this way you can have constant header and/or footer section. Add the following to your skin .ascx:

<!--#include file=”includes/header.ascx” -->

... rest of your skin definition ...

<!--#include file=”includes/footer.ascx” -->

Both files are in the sub-dir: "includes".

BTW no garantees, I havent tried it myself, but you are happy to try it

Peter


Peter Schotman
Cestus Websites voor DotNetNuke oplossingen in Nederland
Contact us for your custom design and skinning work.
 
New Post
9/21/2006 10:50 AM
 
Thanks much for the feedback, it is helpful.

I think the downside of option 2 (using one skin with a single center region, and making each page layout one module) is when it comes time to change the layout of the page. If I make direct use of modules such that each of my current user controls becomes one module, then our html look & feel expert can tweak the layout just by modifying the skin. I think this is great, and I totally dig the way DNN is designed to promote this. If I make each page layout one module, she would have to go edit the module itself to change the layout. This is not horrible, this is what we do currently with plain asp.net 2.0, but she would definitely like being able to stick to just the skin editing.

As far as includes go, I can see the usefulness but it is still pretty similar to the option 1 solution. If I don't use includes, I would just reference my global header control like:
<uc1:globalHeader id="globalHeader" runat="server"/>
in every skin (along with the Page Register directive). It seems to be essentially the same benefits/drawbacks either way.

Another option I was considering is using a masterpage like I do currently and just setting it at runtime (so I don't have to edit default.aspx to specify it). But if memory serves I don't think I have access to this from within a Control, I think only a Page can set it. I'll have to check. In any case, I'm leaning towards the solution of just using one skin per page layout and referencing my header and footer control in all of them. We will just have to be careful when creating a new skin to include them, but this is not too dangerous since we will only have a handful of different page layouts. I guess I could always consider extending our publishing script to do some QA checks and enforce a rule that all skins must have the header/footer references. Or maybe just write a tool that flattens nested skins so I can manage skins in a nested manner but have them look flat for DNN ;)

Thanks,
Adrian
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Consistent header/footer without nested skins?Consistent header/footer without nested skins?


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