Glossary

NEWS & TIPS

  • Site Access Keys
  • Top: Alt+t
    Previous: Alt+,
    Next: Alt+.
    Up: Alt+;
    (Note: use Ctrl on the Mac)

Relative Link

icon Relative links allow path references to other pages or files be written in a way so that the file can be located by navigating from the current page, as opposed to starting at the root directory and following a long path (an "Absolute Link").

Relative links are often written like this:

../../styles.css

This link will be interpreted so that when the link is selected, the browser will move "up" two folder levels from the current location and then find the styles.css file a that new folder location. For example, if the current page were located at the URL "http://www.hannonhill.com/one/two/three/page.html" and this link were clicked, the browser would open the resource "http://www.hannonhill.com/one/styles.css". However, if the user were viewing a different page at "http://www.hannonhill.com/one/two/page.html", the link would take the user to "http://www.hannonhill.com/styles.css". Thus, we see a pattern emerge: for each ".." in the link, one folder will be removed from the path.

Relative links are called relative because the resulting resource is "relative" to the current location of the user. Absolute links are called absolute because no matter where the user is, that user will always be taken to the same location represented by that location.

Cascade Server treats relative links as broken links, because only absolute or fully-qualified links are considered valid. Relative links are reported as broken by both the link checker and publish link checker. The standard link checker runs when a page is saved; when running this link check, users are able to fix the broken link before completing the save action. However, in the publish report link checker, broken links are listed at the bottom of the publish report and a link will be provided to the page, along with the broken link text.

Relative links can be used in the CMS if needed. Some websites require files to be managed only on the webserver, instead of being managed through Cascade. If this is the case, a relative link within the CMS will help link to this externally managed asset. This case works since links from Cascade Server, while absolute before publish, are converted to relative links after publish.

See Also

Last modified on Wed, 06 Aug 2008 10:07:38 -0400

Topic Feedback Form

Content Rating:
Email:
Feedback:


Top / Previous / Next / Up / Table of Contents