Adding a link for a new page

After a new page is created, you can add a link in the portal to open the new page. You can add a link to any layout in the portal.

Caution: 
Some portal layouts have multiple versions. Before modifying a layout, see About responsive UI layouts.

This topic describes how to add a link in the Activity menu. It explains how to find the layout using inspection mode, how to add link text to the layout, and how to enable the link in the server script.

To complete this task, you must have a user account in the back office that is set up for logging in to both the Portal Manager and the portal website.

  1. Sign in to the development portal website for which to add the page link.
  2. Click the maintenance icon to enter developer mode. See Developer mode.
  3. Click the inspect icon to enter inspection mode. See Inspection mode.
  4. Find the layout in which to place the link.

    For this example, expand the Activity menu and then move the mouse over any one of the menu options. With a cell highlighted, click the pin icon and then in the inspection ribbon, click the layout folder. This opens the MasterTopHeader_MenuBar layout in the Layout Editor.

  5. In the Layout Editor, click Edit. A copy of the layout is made for your originator.
  6. In the right pane, collapse the Collection section and expand the Regions section. Select the region in which to place your link.

    For this example, select Menu2A.

  7. In the active card design in the center of the page, click the cell in which to place your link. You may have to use the Design section in the right pane to add a cell or split an existing cell, depending on the layout you choose.
  8. In the right pane, collapse the Regions section and expand the Cell section. For descriptions of cell options, see Layout Editor user interface. Specify this information:
    Type
    Select Unbound.
    Name
    Specify a unique name for the label. This is not displayed on the portal.

    For this example, specify NewPageLabel.

    Data
    Specify the link text to display on the portal page. This can be literal text or a translatable string.

    For this example, specify New Page.

    Tooltip
    Optionally, you can provide a tooltip for the link.
    Rendered?
    Select this option. This makes the link visible on the portal page.
    Field display format
    Select TextClick. This makes the link clickable.
  9. In the Layout Editor, click Save.
  10. Launch the Portal Manager for this portal. Use the same user account credentials as those used to log in to the portal, since the layout is now locked by that user account.
  11. Select Content Development > Layouts and click Refresh.
  12. Find the layout you edited.

    For this example, you edited MasterTopHeader_MenuBar.

  13. Right-click the Server Script column for this layout and select Edit Server Script.
  14. Locate the section of script that pertains to the updated layout region, and add a line to associate the new clickable link with your new page.

    For this example, add this line: context.UnboundComponents("NewPageLabel").NavigateToURLOnClick = context.NavigateToSitePageAsURL("page name"). If your new page is not inside the IPFSitePages folder, you must include the path with the new page name.

    Note: The page name you specify inside the quotation marks must match exactly with the page name as listed under Content Development > Pages in the Portal Manager, including the file extension if applicable.
  15. Save the script.
  16. To review the change, open or refresh your portal website and navigate to the location in the menu where you added the link.
  17. Make this change for all versions of the layout, when applicable.