What are Paths?
All pages on your site are assigned a URL "path" which refers to the direct location of the webpage or file on your website. URL paths are sometimes referred to as a "permalink" for the page.
This path is what your visitors will use to visit that page and what your menu will link to if you add the page to the menu.
How are Paths Generated?
By default, the URL path for each content page (e.g. basic page, news articles, events, landing pages) is automatically generated based on the page title once the page is saved. In this example, the url path would be https://briantest.princeton.edu/Page-Title once the page is saved.
In some cases you may want to manually edit the path/permalink for a page. This can be done by entering/modifying the text in the "permalink" field directly beneath the title on the edit form for a page. When manually providing a path, follow some best practices:
- Use only lowercase letters
- Don't use spaces or underscores, instead use hyphens
- Exclude commas and apostrophes
- Keep the path concise
Automatically generated paths will differ depending on the content type of the page, the menu link title, and the page title.
For example, if you create a Basic Page or Landing Page called "Graduate Program" and place it in the menu as a child of your existing "Academics" landing page, the path for the page will become /academics/graduate-program. If you don't place pages of these types in the menu, a path for them will likely not be automatically generated and will default to the system path of /node/[node_id]. In this case you should manually enter a path that's appropriate for the page.
For content types that are not added to the menu, like News Articles and Events, the auto-generated path is derived from the name of the content type and the page title. For example, for an event titled "Commencement Celebration" the path will become /events/commencement-celebration.
How are Paths Changed?
If the path you entered was manually specified, simply edit the page and update the path to what you'd like. When manually updating the path, you may want to add a redirect that redirects the old URL to the new one. This is important if the old URL has been indexed by search engines or is linked to from other pages on your site. If you want to remove your manually specified path and have a new path automatically generated, simply clear out the custom path and save.
If the path for the page was automatically generated, it will be automatically updated if you update the menu link title (for Basic Pages or Landing Pages) or the page title (for other content types). In this case, your site will automatically generate a redirect from the old path to the new one and inform you of the change.
What are Breadcrumbs?
A breadcrumb (or "breadcrumb trail") is a secondary navigation tool to help users find their way around a website. Breadcrumbs typically appear as a "trail" of links at the top of the page to indicate to the user where the page is in the hierarchy of pages.
In terms of usability, breadcrumbs reduce the number of actions a website visitor needs to take in order to get to a higher-level page, and they improve the findability of website sections and pages.
How Breadcrumbs are Generated
Breadcrumbs are generated based on the path (or "permalink") of the page being displayed. When generating the breadcrumb for a page that's being viewed, each "level" of the path is checked to see if a page exists with that path. If so, it's added to the breadcrumb trail.
This is best explained by example.
Let's say you have 3 pages on your site:
- Page A with path /page-a
- Page B with path /page-a/page-b
- Page C with path /page-a/page-b/page-c
Someone visits Page C, which has path /page-a/page-b/page-c. When generating the breadcrumb trail, the system starts from the first level of the path and moves up, performing the following checks:
- Does a page on your site exist with path /page-a? If so, it's added to the breadcrumb trail.
- Does a page on your site exist with path /page-a/page-b? If so, it's added to the breadcrumb trail.
- Does a page on your site exist with path /page-a/page-b/page-c? If so, it's added to the breadcrumb trail.
The label used for each page in the breadcrumb trail corresponds with the menu link title for that page. If the page is not in the menu, then the title of the page is used instead.
Due to this behavior, you must remember that if you change the path of your "parent" pages to something else, you need to manually update the path of the child pages as well. If you don't the breadcrumb trail for the child pages will not include the parent page in the path.
Turning Breadcrumbs Off Site-wide
Breadcrumbs are not always necessary or useful. If you have a website that only has a single-level hierarchy or does not have many nested pages, then a breadcrumb trail is not needed. In the template system, you may turn off the breadcrumb feature.
To turn on/off breadcrumbs:
- From the admin toolbar, Go to Appearance
- Select Settings (for the theme that you're using)
- Under Breadcrumb Settings, select yes or no
- Click Save Configuration