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

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Referenced Modules in Page Templates?Referenced Modules in Page Templates?
Previous
 
Next
New Post
12/7/2009 6:10 PM
 

I want to create a DNN site in which each of our departments has a different sidebar.  The logical way to do this, I think, would be to create a separate page template for each.  The problem is that if we need to modify the sidebars in the future, this approach would require editing each page that contains the modified sidebar.  I've attempted to create page templates using "referenced" modules, hoping this would allow editing only the "referenced" module when sidebar content needs to be changed, but this approach results in a content-less sidebar module being created on new pages. 

Is there a way to accomplish this goal?  One option I've considered is making each department a separate portal, and including the sidebar in its skin, but this seems like a clunky approach.  Thanks for any help.

 
New Post
12/8/2009 4:44 AM
 

The way I generally do this sort of thing is just to add a bit of conditional code to the skin's ASCX file. Basically, assuming you can work out which department owns the current page, you can just do something like:

<% If department = "Sales" Then %>
    Sales sidebar
<% End If %>

Alternatively, if the coding would be too complicated, you could use a separate skin for each department, but make ASCX controls for the common parts of the page, e.g.

<%@ Register TagPrefix="my" TagName="CTL1" Src="Shared/ctl1.ascx" %>
<%@ Register TagPrefix="my" TagName="CTL2" Src="Shared/ctl2.ascx" %>
<my:CTL1 runat="server" />
Sales sidebar
<my:CTL2 runat="server" />

Hope that makes sense!

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Referenced Modules in Page Templates?Referenced Modules in Page Templates?


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