Hide container in portal based on user record

David Sloan
Giga Guru

I have a user-defined field on the sys_user table. Based on this field I would like to show/hide containers on the home page of our portal. As I understand it, you cannot OOB hide a container based on user criteria, so what is the best way to do this? Should I add a script to that portal page that checks this value and shows/hides the DOM element accordingly? As I understand it, this method is not advised. So what is advised? And if I am creating a script on the page, how do I check that value from the server?

10 REPLIES 10

David Sloan
Giga Guru

I am starting to think I can't get DOM manipulation to work. It seems that there are a few ways to do what I want to do:

The Goal: make the homepage of the portal look different for different users.

Options:

  1. Domain separation: This would be the easiest way to do this. Unfortunately I have been instructed not to turn on the domain separation plugin.
  2. Use the same page but show/hide containers that contain the different views. I thought this would be the next best thing, but I cannot get DOM manipulation to work or find another way to do this.
  3. Create a new page and bounce certain users to it any time they hit the homepage. I cannot find a way to redirect users from one portal page to another.
  4. Create a new portal with its own homepage. The problem is that everyone will use the same URL. It is in all of our advertisements and email notifications. So we would need to make it so any time a user from the one group hits the old portal it redirects them to the new portal.
  5. Is there a fifth, better way to do this?

Which approach is going to be best for me, and how do I accomplish it?