URL aliases

Your YaleSite automatically creates friendly URLs using Clean URLs and the Path Auto module. When you create and save a page, the URL is translated to the title of the page, replacing spaces with dashes (-) and eliminated words with three letters or less (a, and, the, etc.).

However, there may be times when you want more control over the path generated for pages you create with specific content so that it follows a logical path. For example, you might want to have the URL alias for faculty member pages begin with the word “faculty” – sitename.yale.edu/faculty/john-smith. This can be done with the Automated URL Alias feature. This is especially important to ensure blocks display on specific pages using the shorthand academics/* (all the Academic pages get the Academic Menu Block).

YaleSites URL Alias Settings

It is important to note that URL aliases are set for the Basic Page Content Type and Content Types for other pre-built features.

  • The pre-built features are set to define the path starting with the name of the content Type
    • sitename.yale.edu/news/news-item-title or sitename.yale.edu/gallery/senior-class-field-trip.
  • The Basic Page Content Type using a token that allows you to create pages based on the menu structure. So if you are creating a Basic Page and select Academics as the “parent” menu item, your URL alias would be:
    • sitename.yale.edu/academics/page-name

If the “parent” is Graduate Programs under Academics (see Sample Hierarchy above) the URL would be:

  • sitename.yale.edu/academics/graduate-programs/page-name.

Creating a URL Alias

If you create your a Custom Content Type you will need to assign a URL alias to that Content Type if you want to defined the path of the URL:

  1. Go to Configuration -> Search and metadata -> URL Aliases from the administration toolbar.
  2. Click on the Patterns tab. There you will see several options for creating URL aliases based on the type of content you are working with.
  3. Select Node paths to create URL aliases for specific types of content.
  4. Build the path you want to create: Type words to define the base “folder” or “directory”.
  5. Use tokens/replacement patterns to build the rest of the URL string:
    • [node:title] - title of the page
    • [yyyy]/[mm]/[dd] - date the page was created
    • [node:author] - author name
    • [term-raw] - taxonomy term
  6. Save the configuration. As you create your pages, the URL paths will automatically be built to match your configuration. 

Important Note: This is an important step when creating any Content Type to ensure the URL alias is set as content is created. Pages created prior to URL alias setup do not automatically update to the new URL alias.