Products

Solutions

Learn More

Partners

Community

Blog

About

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...Change Home Page DynamicallyChange Home Page Dynamically
Previous
 
Next
New Post
9/20/2011 5:13 PM
 
Yes, Stephen, I can code (I'm currently enhancing the core HTMLPro module for another project).

While a simple redirect is easy enough to do if this were a straight forward page or UserControl, DotNetNuke dynamically loads controls into dynamically created page (Tabs) so knowing where to make the appropriate change without negatively impacting the framework is where the difficulty lies. In addition, while I can use the Request.ServerVariables["AUTH_USER"].ToString() TOKEN to determine whether a user is logged in, I do not know what what TOKEN/ServerVariable I need to use to determine the Roles that are available to a user

While I can write somehting outside the framework, my interest is making the change within the framework.

If the logic is simple for this redirect (within the framework), please feel free to share anything that could assist not only me but by others looking for this solution in the future.

Thanks,
Jeff
 
New Post
9/20/2011 5:35 PM
 
Stephen,

BTW. I do appeciate your response and did not mean my reply in any sarcastic way, re-reading it I realized it could be taken that way. I'm just trying to give you a better understanding of what I am capable of and where I have holes in my framework knowledge.

Any assistance is appreciated.

Thanks,
Jeff
 
New Post
9/20/2011 8:36 PM
 
I didn't take it any way at all. Sometimes it's hard to offer a suggestion to folks who aren't programmers. I was about to write up some code but I did a little Googling and found this:

http://www.snowcovered.com/snowcovered2/Default.aspx?tabid=242&PackageID=20892

And it's free!!!


Steven Webster
Manager, Community Platform
F5 Networks, DevCentral
 
New Post
9/20/2011 8:46 PM
 
PS - I found this code I wrote years ago to do just this.

Code:

        Sub RedirectUserCheck()

            If Not UserInfo.IsSuperUser Then
                ContainerControl.Visible = False
                If UserId <> -1 Then
                    Response.Redirect(Settings("RedirectURL").ToString)
                End If
            Else
                ContainerControl.Visible = True
                txtRedirectURL.Text = Settings("RedirectURL").ToString
            End If

        End Sub

Protected Sub btnSave_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSave.Click

            Dim objModules As New Entities.Modules.ModuleController
            objModules.UpdateTabModuleSetting(TabModuleId, "RedirectURL", txtRedirectURL.Text)

        End Sub



Steven Webster
Manager, Community Platform
F5 Networks, DevCentral
 
New Post
9/21/2011 10:38 AM
 
Steven,

Thanks for your response, I greatly appreciate you getting back to me! I have downloaded the Snowcovered package and will look into it's functionality since it's free and thanks for the code as well, It is actually very similar to what I have to show/hide panels based on the userID in my module.

Just going to describe where I am for others searching for this type of solution in the future:

I did mange to find another way to handle my issue. What I did was to change the menu for the page by using jQuery and CSS to replace the content of the menu with another division referencing #Nav so the page title does not read 'Home' for registered users. I also managed to create a supplimental table with the roles and a module to display based on the role. The issue being that this table currently has to be manually updated. This works if roles are fairly consistent and only not being changed or added to often. My workaround to having a bunch of modules on the home page that impact what the administrator has to scroll through in order to update content and see variations fo this module based on role was to create a number of additional pages (only visible to the admin role) that contains my module. Onload it picks up the page name using jQuery to determine what to display in the module (hides other panels by default in the css) so the administrator can see the pages as if they are logged on using that role (of course if the page name changes it will cause some issues in the code). But this is currently in place and seems to work. HTML Content had to remain on the main Home page for the admin to update content, but in my case this was only a single module with content so no big deal. I also had to hide my module using jQuery on the home page for the admin so that the admin does not see this on the main home page for all roles when they login (since I cannot see a way to hide content from the admin) which also opens this up to viewing by other roles in the future.

I have given some consideration to using the iframe module in the page to dynamically load the frame contents based on the logon. This of course would take me outside the framework and have me calling pages different pages, but I could also create a simple module to allow the admin/host to load the page(view) of their choosing when they view the page. Just another thought that may be more efficient than previous method for accomplishing this.

For my own knowledge, in reference to the code you have included above, does the code have to be included in a module that is placed on a page or is there another way to extend the framework for a specific page without impacting the base framework and without using a second portal? I have been developing outside dotnetnuke for a number of years now and am just recently starting to develop in dnn and trying to gain a deeper understanding of the framework than I had years ago. Just curious more than anything.

Thoughts? Comments?

Thanks again,
Jeff
 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Change Home Page DynamicallyChange Home Page Dynamically


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