Linking to interior pages
Depending on what paragraph types you are editing, there are two ways to link to interior pages:
- search by page name in the URL field
- input URL directly in URL field
Search by page name
If the URL/Link field has a magnifier glass to the right, you can type the page title in the URL field, and select from the search results.
For these types of links, you don't need to worry if the site name changes or if there is a site page restructuring since this link will continue working.
Input the URL directly
If the URL/Link field does not have a magnifier glass to the right, you have to add the URL instead of just searching for the name of the page.
In the WYSIWYG paragraph type, select the text you want to link, and click the chain link icon on the top navigation bar. A new popup appears, where you have to type the URL directly. See below the options for absolute vs. relative URLs.
Absolute vs. relative URLs
There are two ways to link to interior pages when inputting the URL directly into the URL field. The first option works when the site URL is not going to change, and the other is when your site URL is temporary.
When to use an absolute URL?
An absolute URL contains the entire address from the protocol (HTTPS) to the domain name (www.drupalguide.com) and includes the location within your website in your folder system (/foldernameA) names within the URL.
You should use absolute URLs if your site URL is not going to change (i.e. if the URL of the site we provided starts with int.slac.stanford.edu or web.slac.stanford.edu)
Example of an absolute URL:
https://drupalguide.slac.stanford.edu/policies-and-guidelines
When to use a relative URL?
A relative URL does not use the full web address and only contains the location following the domain. It assumes that the link you add is on the same site and is part of the same root domain.
Example of an relative URL:
/policies-and-guidelines
If your site URL is temporary and is using the Pantheon development URL (i.e. http://live-slac-proton-d9.pantheonsite.io/ ) you should use relative URLs, since they will keep working when transitioning to the permanent SLAC URL.