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, ...Changing the Parent Page Via Code?Changing the Parent Page Via Code?
Previous
 
Next
New Post
4/24/2010 6:48 PM
 

Hi Folks,

Is it possible to change the parent page of a child page based on some criteria like user role via code? It seem as if you might be able to do this in the code behind of the ascx. Has anyone done this?
 
Thanks,
G.M.
 
New Post
4/25/2010 3:23 AM
 

Sure you can do that, but that would mean the parent of the page would change whenever a roles would log in..

Would be a bit strange, could you tell us why you want to do that?

Or is it just meant to fake the parent in the skin without actually changing it?

 
New Post
4/25/2010 12:51 PM
 

“…tell us why you want to do that?...”

 

Sure, Timo. Here is the total ugly truth.

 

I am building a site with multiple groups in one organization. For each group the top level menu is the same with one exception. They each have their own home page which “replaces” the “public” home page when they log in. That works because only unauthenticated folks have permissions to see the “public” home page. There is only one administrator. I thought separate child portals would be overkill. For one thing the administrator would have to log in to each portal separately, correct?

 

Anyway I used the Data Springs Dynamic Login module redirection feature to handle showing different home pages and regular role permissions to show different sub pages under the top level menu items. I also used the menu upgrade I got from Mark Allan’s DNN Garden site for the SolPart Menu. It all works very well for each group. However, it gets a little busy for the administrator especially with the home pages since this is a horizontal menu. There are only 2 groups now but there could be more than 20 soon.

 

Since there is one “public” home page I thought I might be able to make that “Home” menu item subsume all the other group home pages as child pages programmatically when the administrator logs in. They each have a slightly different name (Home for “Group Name”, etc.).  I didn’t think it would be possible to have a separate menu display on all pages for just the administrator like say a vertical one. I guess the other alternative would be to try a vertical menu for all users or one of Mark Allen’s more complex templates. One problem I would have with a vertical menu is that the home page is basically one big Flash module. The design of the Flash module wouldn’t accommodate the vertical menu well. I guess I could try changing that.

 

In the past I have looked at doing DNN menus in Flash but communication between Adobe Flash and DNN is kludgy. At one point I even had the grandiose idea of having a complete Adobe Flash front end with a DNN back end, i.e. everything you viewed would be Flash but the plumbing would be DNN. I have experimented with it using JavaScript. You have to worry about stuff like encryption of passwords, etc. I have decided to learn Silverlight and MS Expression as an alternative to Flash where tighter integration is needed.  

 

Anyway if anyone can suggest a better approach to this menu problem I would be glad to hear it.

 

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Skins, Themes, ...Skins, Themes, ...Changing the Parent Page Via Code?Changing the Parent Page Via Code?


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