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
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.
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:
site!
domain and select the site..
after site!<Site Name>
to autosuggest the site pages.pages
to access the menu of pages configured in the site object.pages
property.For example, the reference below refers to the My Projects page on the DOT Site.
When you highlight a site page from the dropdown, Appian automatically provides additional information about the page, including:
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().
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.
Reference a Site Page