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...User PersonalizationUser Personalization
Previous
 
Next
New Post
1/28/2009 12:57 PM
 

Hi Everybody,

Actually i am craeting an intranet website. In this website i want to do personalization for everyone who will use this website. If someone will open this website he directly goes to his page. So my problem is here i have two roles Role A and Role B. In each role there are around 100 of members. What i want i want to create two home page in other words two differnt format of home page one for Role A and other for Role B. Means there should be two entry pages. May be its very stupid question but for me its very important beacuse i am quite new to dnn as well as to web developing.

Right now i am using active directory authentication. so this authentication everyone is coming on the same page . i dont know how to avoid this could you please help me on this.

Thanks
Akshay 

 
New Post
1/28/2009 2:58 PM
 

Without changing anything in the core DNN code, an easy (free) solution would be to simply auto-forward users from the default HOME page to whatever page you want that user to go to based on their assigned security role(s).  That is, all users would still initially go to the default home page but would be immediately forwarded to their "personalized" page if they were a member of a specified role.

You could -almost- do this with the latest Text/HTML module via tokens and a small bit of javascript.  Unfortunately, user role info (token is [User:Roles]) is locked down and not accessible via the token replace feature.

An alternative is to use a "SQL" module to query the DB for the appropriate info and generate the needed javascript to load the appropriate target page.  I use such "SQL" modules all the time to add custom functionality without altering DNN or writing custom modules.
 
 
EXAMPLE:
Here's a simple, two-step no-frills example using the free AdvancedDataGrid module from Efficion Consulting (includes free source code!).  In this simple example, the ADG module will forward you to Google if the account's DISPLAYNAME is set to "mytest1", to YaHoo if set to "mytest2" or give an alert message for any other DISPLAYNAME value.

(1) Add the AdvancedDataGrid (ADG) module to a test page.  (Try this on a test page before using on your portal's home page!)
 
  If you're not familiar with the free AdvancedDataGrid module, I've blogged about it here (includes other enhancement examples/code):
 
    Part 1:  http://www.eguanasolutions.com/DNN_Blog/EntryID/2.aspx
    Part 2:  http://www.eguanasolutions.com/DNN_Blog/EntryID/5.aspx
    Part 3:  http://www.eguanasolutions.com/DNN_Blog/EntryID/13.aspx

 
(2) Go into the ADG module's settings and add the following as your SQL :
 
  select
    case DisplayName
    when 'mytest1' then
      '<script>window.location="http://google.com";</script>'
    when 'mytest2' then
      '<script>window.location="http://yahoo.com";</script>'
    else '<script> No match found.");</script>'
    end
  from users where Userid = [dnn:UserID]

 
Try It Out:
Create a test account and set the account's DISPLAYNAME to "mytest1".  Log in with the test account, go to the test page and you'll be forwarded to Google.  Go back to your site, change the account's DISPLAYNAME to "mytest2", go to the test page and you'll end up at YaHoo.  Neat!

 
For your scenario, you'll need to come up with a SQL query to determine what user roles get forwarded to what target pages on your site.  That query will be a bit more complex than the simple example I've presented.
 

I think you've presented a good question...I'll update this thread if I get some time to play with writing a query to match your specific need.
 
Cheers!
-mamlin


esmamlin atxgeek.me
 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...User PersonalizationUser Personalization


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