Paths / Aliases

Some of this documentation is specific to the Drupal part of our website, but the rest is recommended for any web paths that we have control over.

Format

Ideally, paths should be lower-case letters, numbers, and slashes.  Words should be separated by hyphens.  It is recommended that you do not use abbreviations for words.

In Drupal, you should not include a slash at the beginning or end of the alias.  Also, do not include filename extensions, like .html, .php, etc.

Correct:

  • web-design-guidelines

Incorrect:

  • WebDesignGuidelines
  • web_design_guidelines
  • web-design-guidelines/
  • webguide.htm

Diacritical Marks, Non-Latin Characters, etc.

Although Drupal does support paths using almost any characters, it is strongly recommended that you transliterate the paths to only the basic Latin alphabet.

Recommended:

  • resume
  • siku-quanshu

Not recommended:

  • résumé
  • 四库全书

This does not normally have any effect on someone's ability to find the page since you can include the special characters in the content of the page.

If you have a case where you absolutely must use an extended character set in the paths, please speak with our IT department before doing so.

Underscores in Codes

If you are writing technical documentation you may occasionally need to include a special code that has an underscore in it in the path.  If that does happen, then you should use the underscore, but still convert to lower-case.

Correct:

  • http_request

Incorrect:

  • HTTP_Request

"Folders"

Your content should be organized in logical groupings.  Ideally, the paths to your content, the menu structure of the site, and the names of the pages should all follow a predictable pattern.

In Drupal, there are no real folders but your paths should still include slashes to indicate structure.  Whenever possible, keep the "folder" names consistent on every page in that group.

Correct:

  • web-design-guidelines/paths-aliases
  • web-design-guidelines/html-markup
  • web-design-guidelines/html-markup/headers

Incorrect:

  • paths-aliases
  • web-design-guidelines-paths-aliases
  • web-guidelines/html/headers