logo

Personal tools
Vasudeva Plone Basics Adding Internal Links to a Website
Document Actions

Adding Internal Links to a Website

Internal links allow a visitor to move from one page on your website to another. There are two ways to specify an internal link: relative to the home page or relative to your current folder.

The difference is best illustrated by an example. Currently we are in the 'Plone Basics' folder. Now if we want to link to the 'Add Content' page in this folder (which has short name 'addcontent':

  • Relative from the site root: i.e /plone_basics/addcontent. Note the address begins with a slash.
  • Relative to folder: 'addcontent' is in the same folder and just write addcontent. Notice there is no slash before.

In general we recommend to link relative to the site root, especially if you are linking from a portlet or blog, because the relation between the link and the target can change. A content editor like Kupu may automatically create a url relative to the folder, so be careful.

Internal Linking Tips

  1. Plone have recently decided to standardise urls without a trailing slash.

    Previously there were many different URLs pointing to the same page like /sri_chinmoy, /sri_chinmoy/, /sri_chinmoy/view, /sri_chinmoy/index_html e.t.c. Now this has been standardized without trailing slash - i.e. /sri_chinmoy.

    • internal links should be like this: /plone_basics/images/resize_images_for_website points to the resize images page
    • in reStructured Text:
    `Resize images < /plone_basics/images/resize_images_for_website>`__
    
    • Summary: include slash at start but not end!
  2. Number of Internal Links in a page

    This is something of personal preference. Some people like a lot, others find them distracting. Personally I like using them in moderation. For example linking a key word like Sri Chinmoy is good, but once or twice is fine. There's no need to do it every time it occurs. But Internal links are helpful for Search Engine Optimization . Links suggest these pages are important and so they are given a higher weighting by the search engine.

  3. Duplicate URLs:

    This can occur in Plone sites when a relative url is added onto an existing URL making it longer than it need be. This occurs when you link to something in a higher folder elsewhere and leave off the trailing slash e.g. if you added a link sri_chinmoy to this page it will assume sri_chinmoy is a subfolder of this one. It would create a url /plone_basics/sri_chinmoy. If you put in the slash (ie /sri_chinmoy it will not occur.)

page created by Tejvan Pettinger last modified 2007-06-20 17:56