The Group-based Redirects enhancement redirects members who land on a specific page (such as the Homepage) to another location within your digital workplace based on their group membership.
Sections in this article:
- Considerations
- Set up the enhancement
- Configure the enhancement
- Turn the enhancement on
- Turn the enhancement off
- Use the enhancement
Considerations
- Igloo Mobile App: This enhancement is not compatible with the Igloo mobile app.
- Performance issues: Performance issues can occur if there are too many groups to redirect. Limit use to a maximum of eight groups.
- Browsing accessibility: The redirect occurs within the active browser tab and does not open the destination location in a new tab.
- Multiple redirects: You can have multiple pages with their own specified redirects, but those pages must be stored in the top-level location in the Site Manager.
Set up the enhancement
To set up the enhancement for the first time, follow the steps below. To request this enhancement to be set up in your digital workplace, contact our Igloo team.
Create a page to initiate redirects
To create a landing page for your redirect:
- On the Userbar, select
Control Panel.
- Under Presentation, select Site Manager.
- Select + Add, and choose
Page from the dropdown.
- In the Add Page dialog, configure the following fields:
- Template: N/A.
-
Page Title: Enter a name for the page. For example,
Landing Page. - Location: Select the top level location.
- URL Identifier: Enter the URL pathname for the page.
- (Optional) Hide from navigation: Select to prevent the page from being shown in any navigation menus.
- Select Add to create the page.
- Select the down arrow beside the page name, and select Full Edit.
- Place an HTML Content widget and select Edit on the widget.
- In the content area, enter the text:
Please wait while you are redirected. - Select Update.
- Select Publish Page.
Set up the configuration tool
We provide a configuration tool that can be added to your Styles page to help you quickly configure the enhancement. If you have already set up the enhancement, you can skip this section.
Add the configuration tool to the site header
Warning
Adding code that contains errors can disrupt the functionality of your digital workplace. Use caution when adding code to this area.
Add the following code to the header of your digital workplace:
<script src="https://igloo-prod.azureedge.net/cmedia/enhancements/dynamic-styles-pages/js/group-based-redirects-object-maker.js" type="text/javascript"></script>Add the configuration tool to the Styles page
Now that the configuration tool is included in the header, you can add it to your Styles page:
- On the Userbar, select
Control Panel.
- Under Presentation, select Site Manager.
- Select + Add, and choose
Page from the dropdown.
- In the Add Page dialog, configure the following fields:
- Template: N/A.
-
Page Title: Enter the following name for the page:
Group Based Redirects. - Location: Select Styles,.
-
URL Identifier: Enter the following URL pathname for the page: :
groupbasedredirects. - Hide from navigation: N/A
- Select Add to create the page.
- Select the down arrow beside the page name, and select Full Edit.
- Place an HTML Content widget and select Edit on the widget.
- In the Appearance tab, in Class, enter this class name:
instructions-group-based-redirects. - Select Update.
- Place a second HTML Content widget below the first widget and select Edit on the widget.
- In the Appearance tab, in Class, enter this class name:
object-creator-group-based-redirect. - Select Update.
- Select Publish Page.
The tool is now ready to be used to help you configure the enhancement.
Configure the enhancement
To configure the enhancement, you must use the configuration tool to create your code before placing it on the redirect page.
Use the configuration tool to create your code
- Go to the Styles page by visiting
https://{your digital workplace domain}/stylesor by navigating to it through your Site Manager. - On the Styles page, select Group Based Redirects from the menu.
- In the Select Member Groups column, select up to eight group checkboxes, and update the URL to the page that group members should be redirected to.
- In the Select Options section, configure the following:
-
redirectPage: Enter the URL value of the previously created page, prepended by
ig-page-. For example, If the page is at /landingpage, enter the classig-page-landingpage. - defaultRedirect: Enter the URL (without domain) of default fallback location. If this value is left blank, then group members who aren't otherwise redirected will stay on the page.
-
redirectPage: Enter the URL value of the previously created page, prepended by
-
Select Copy to copy the code block that will appear similar to this example:
<script>var redirectSettings = { "groups": [
{ "guid": "68fdae44-3dfe-ea11-80d9-003e3a0c17865", "url": "/adminhub" }, { "guid": "6afdae44-3dfe-ea11-80d9-022d3a0c1465", "url": "/employeeresources" }, { "guid": "6cfdae44-3dfe-ea11-80d9-000d3a0c1495", "url": "/itresources" } ], "redirectPage": "ig-page-landingpage", "defaultRedirect": "/home" }</script>
Add the code to the redirect page
Now that the code has been generated, you can add it to the redirect page:
- Go to the redirect page.
- Select
Actions and then Advanced.
- In the JavaScript Code section, paste your code.
- (Optional) Reorder the groups: You can order the groups by order of importance of redirection in case members belong to multiple groups. They will be redirected to the first group's location where they have membership. It can be helpful for the Administrator's group to be listed first to ensure they are redirected to the appropriate page. To move a group, you can copy and paste an entire group section with a comma following the code. For example,
{"guid": "6afdae44-3dfe-ea11-80d9-000d3a0c1495", "url": "/employeeresources"},. Ensure the last group section does not end with a comma. -
At the bottom of your code, paste the following code:
<script src="https://igloo-prod.azureedge.net/cmedia/enhancements/redirects/groupBasedRedirect.js" type="text/javascript"></script>
- Select Save.
(Optional) Final step to redirect the Homepage
If you are redirecting your digital workplace's Home page, you will need to do the following steps:
- On the Userbar, select
Control Panel.
- Under Presentation, select Site Manager.
- Under the Homepage dropdown, select the redirect page.
Turn the enhancement on
Once the code has been placed, the enhancement is ready to be used. If you have already turned the enhancement off following the steps in the Turn the enhancement off section below, follow the steps in Configure the enhancement section above to regenerate the code and place it in the redirect page's Advanced page.
Turn the enhancement off
To turn the enhancement off, you can remove the code entirely from the redirect page's Advanced page. To view the page, visit https://{your digital workplace domain}/{your redirect page}?action=advanced.
Use the enhancement
Members will be redirected to predesignated pages based on their group membership.