Share

Appropriate Use Of The "Short Name" Field

The "Short Name" field in Plone sets the URL segment for the current page/folder. This field is automatically set when the page is created, and usually does not need to be modified.

Where does it come from?

To populate this field, Plone lowercases the title, and replaces all non-alphanumeric characters with "-".  For example, by default, the title of this page:

Appropriate Use of the "Short Name" field

would be translated to:

appropriate-use-of-the-short-name-field

For blog entries, and folders at the third level of the site or lower, this is not usually a concern.

When should I change it?

In some cases we may want to edit the short name:

  • You moved/copied pages, and the short name now ends in a "-1" (e.g. "my-page-1") or begins with "copy_".
  • You misspelled the title when creating the page, and the short name is now misspelled.
  • The page is on the first or second level of the site (e.g. "contact-us" should be "/contact")
  • The short name duplicates a previous URL segment (e.g. "/research/research-news" should become "/research/news")

However, this is the exception, rather than the rule. In general, it's best to leave this field alone unless you intentionally want to set what shows up in the URL.

What should I set it to?

Some general guidelines when setting the short name:

  • Use only lowercase letters, numbers and dashes. No spaces, underscores, capital letters, quotes, or other special characters
  • To shorten the title of the page, optionally remove small words ("of", "a", "the")
  • Do not abbreviate words, combine words, remove vowels, etc.  For example "short-name" is acceptable, but "shrt-nme" is not.
  • Always look at the short name in the context of the full URL. The URL should read like a truncated information hierarchy leading to the page.

How do I change it?

  • There are a few ways to change the short name:
  • In the green toolbar, go to the Actions menu and select Rename.  This will provide a screen or pop-up window where you can set the short name and title.
  • To rename multiple pages at once, you can click on the Contents tab and check the checkboxes next to the items you would like to rename.  Then click the Rename button at the bottom of the contents listing.
  • If you're editing the document, depending on your settings, you may see a Short Name field before the title.

Examples

This page resides at:

http://agsci.psu.edu/communications/web/best-practices/short-name

The value of the "Short Name" field in this case is "short-name".

Gotchas

After changing the short name of a default page of a folder, you will need to reset that page as the default page.  Plone stores the short name of the default page, and does not update it when you update the short name of the page.