Access Keys:
Skip to content (Access Key - 0)
Home (Access Key - 1)
All spaces... (Access Key - 3)
Log in (Access Key - 5)
Sign up (Access Key - 6)
Toggle Sidebar

Linking to Attachments


Linking to Attachments

Pages, news articles and even user pofiles can have files attached to them. This tutorial shows you how to create links to those attachments...

Linking to Attachments

To link to an attachment, use the following notation:

[^filename.ext]

For example, if you have a file called "logo.gif" attached to a page, you would link to it as follows:

[^logo.gif]

Which would display:

logo.gif

As usual, you can specity custom on-screen text and a tooltip if desired:

[Adaptavist Logo|^logo.gif|Click here for the logo...]

Which would display:

USERGUIDE:Adaptavist Logo

Linking to Attachments Elsewhere

We've shown above how to link to attachments on the same page, etc., but it's also possible to link to attachments elsewhere using the following type of notation:

[Page Title^attachment.ext]

That would link to the file called "attachment.ext" on the page called "Page Title". You can use the same technique for linking to attachments on news articles and user profiles.

Furthermore, you can link to attachments in other Spaces. For example:

[SPACEKEY:Page Title^filename.ext]

There are some benefits and downsides to linking to attachments elsewhere within your site...

Benefits

  • Easier to manage - if there's only one copy of a given file, stored in a single place, you don't need to worry about uploading new versions. If you have the same file attached to multiple locations then you'll quickly run in to problems when updating the file because you'll have to find all the places it was uploaded to.
  • Quicker for end users - if you use the same image on several pages (eg. a product logo), the end-user will only need to download it once and thereafter it'll be pulled from their browser's cache.
  • Less disk space used - if you only have one copy of each file, you'll use less disk space as a result. This is particularly useful when dealing with large multimedia files such as videos. In a hosted environment, this will save you money!

Disadvantages

  • A little harder to link to - it requires a little more effort to linked to a shared file. To make things easier, keep such files in a location that has a short, memorable space key and page title - for example: "FILES:Icons" or "FILES:Pages".
  • You don't know where the files are used - this issue applies regardless of where you store your files, because they can all be linked from other pages, etc., anyway. However, bear in mind that if you want to upload a new version of a file, while you only have to do it in one location, you won't know which other locations it's going to affect. The same applies to deleting a file or the page, etc., that it's attached to.
  • Security can get in the way - you obviously need access to the location where the file is stored, but you also have to consider who will be viewing the files. For example, an administrator can view any file on the server so everything will look fine to them - however, other users might not have access to some areas and would see broken links. Furthermore, what happens if access to the storage location becomes restricted at a later date - you won't know that the change has been made and even if you did you'd them have to go searching for all the places using the files in that location.

Before linking to files stored elsewhere, you need to consider all the disadvantages very carefully. You can get around a lot of the disadvantages by having a publicly viewable space that's carefully managed, but obviously there will be times when you don't want certain files to be publicly accessible.

you can help limit the dangers of re-using files by posting a comment on the page, etc., that contains the file to state which file you're re-using and provide a link to the place where it's being used - that way, if changes are made at a later date (new version, deletion or access restrictions, etc.), the person making the change will be able to check that they've not broken anything.

Hints and Tips

Different types of attachments will give different results when the link is clicked depending on the web browser being used and the applications installed on the computer viewing the page. For example, images and Adobe Acrobat files will usually be displayed whereas ZIP files and documents will usually be downloaded.

Frequently Asked Questions

Q I've attached am image to a page, but want to display the image rather than a link to it - how do I do this?
A See our tutorials on Images, Flash, Videos and Audio.

See Also

Toggle Sidebar

See Also

Incoming Links


Outgoing Links


Added by Guy Fraser on Oct 18, 2005 02:38, last edited by Guy Fraser on Jul 21, 2008 19:14

Adaptavist Theme Builder Powered by Atlassian Confluence