Free cookie consent management tool by TermsFeed Reference a Site Page [Appian Sites]
Reference a Site Page

Overview

You can directly reference the site object in certain functions using the site! domain. This domain prefix is a direct object reference that removes the need to create a constant to reference a site page.

Site object references allow you to reference pages configured in the site for use in a!urlForSite(). This function requires a reference to a site page, not just a site object.

For more information on linking to site pages, see Use URL Parameters to Link to a Site or Portal

Reference a site page

It's easy to construct a site page reference since the site! domain leverages typeahead to suggest a selection of existing sites. If you already know the name of your site, you can even skip entering the domain and simply type the name of the site for the domain and site object reference to appear.

referencing a site by its name

Note:  If you are unable to reference a specific site, make sure that you have Viewer permission to the site object.

The site object reference combined with . dot notation allows you to directly access site pages, which are identified in the object reference by their web address identifier.

To reference a site page:

  1. Enter the site! domain and select the site.
  2. Enter . after site!<Site Name> to autosuggest the site pages.
  3. Select pages to access the menu of pages configured in the site object.
  4. Select a page's web address identifier from the dropdown to append to the pages property.

For example, the reference below refers to the My Projects page on the DOT Site.

example of referencing a site page

When you highlight a site page from the dropdown, Appian automatically provides additional information about the page, including:

  • Site name.
  • Page title.
  • Page web address identifier.
  • Type of page.
  • Interface used as the page content.
  • Whether or not the page is configured to use encrypted URL parameters.
  • URL parameters names that are enabled for the page.
  • Visibility setting

You can also access this information in the expression documentation pane by clicking the site page reference. Notice how the URL parameter names display under Enabled URL Parameter(s). This will come in handy when using the urlParameters parameter in a!urlForSite().

site page information in the expression documentation pane

When using a site page reference, Appian automatically shortens the reference to improve the readability of your expressions. To display the full reference, simply hover over it.

Open in Github Built: Wed, May 01, 2024 (02:58:07 PM)

Reference a Site Page

FEEDBACK