LinksThe simplest way to create a link is to surround the url (which should start with http://) with square brackets. For example, [http://google.com] will make a link like this: http://google.com.
You can further specify the text of the link (as well as other options) by using the long format: [link url 'link text']. As you might guess the 'url' should be replaced by the actual url you'd like the link to point to (make sure to copy this from the address bar), and whatever appears between the single quotes as 'link text' will be the text people actually click on. The variants [link url 'link text' right] and [link url 'link text' new] create links that are right justified and links that will open in a new window (which you should almost never do).
The Nielson/Normal group of web usability experts provides some useful guidelines for writing effective link text.
While creating links to outside sites is (hopefully) unambiguous; e.g. [link http://google.com 'link to google'], there are choices to be made if you're linking to other pages within SERC hosted websites. Here are some guidelines:
- When linking between pages in the same module (whose urls only differ after the last /) just use the last bit of the url of the targeted page: [link page2.html 'link to page 2']
- When linking to an existing page that's on the SERC server but part of a separate project, build the link from the 'server root' starting with the left-most '/': [link /introgeo/models/index.html 'Starting Point Models']
- When linking to a page within the same project you might want to link to the development version of the page: [link /introgeo/models/index.html 'Starting Point Models']. Presumably if you're working on a dev page it makes more sense for your links to point to the other dev pages, rather than the live ones so you can test drive the dev site and really see how all the links will work. Happily when you make a page live all links will automatically have /dev removed so that your live page links will point to their live counterparts.
- You can link to locations within a specific page using an anchor syntax (familiar to those html aficionados among you): [link #midpage 'Jump to mid-page']. This is dependent on the existence of an anchor with appropriate name being added to the appropriate point on the page. In this case [anchor 'midpage'] would do the trick. In addition to linking to locations in the current page, you can point to (previously marked) locations on other pages by adding a # followed by the name of the anchor to the end of the normal link url for that page.
- Avoid using the entire address for links to SERC pages: [link http://serc.carleton.edu/introgeo/models/index.html 'Starting Point Models']. While it will work it's unnecessary and can lead to some confusion (for reasons we won't get into here). Use the format in bullet 2 above.
It's also possible to make "mailto" links using a tag like [mailto:email@example.com].For folks whose browsers are configured to interact with their email program correctly these links are a handy short cut to allow them to start an email to the address provided. Of course these sorts of links also attract spam to the given address and can cause some very confusing behavior for people who's browsers aren't configured in that way. In most cases it's more robust just to provide the email address (without the mailto tag); people can copy the address out of the web page into their email program manually.
There are several other more specialized features of the link tag. Adding 'buttton' or 'bigbutton' to the end of the tag causes it to appear as a clickable button. This is best when the link it set apart from other text rather than being in the flow of a sentence. Finally there is the expert-only 'nocatalog' option which surpresses Serckit's behavior of automatically converting some links to outside resources into catalog records. The full set of option in order (which matters) is shown in this example:
[link url 'link text' nocatalog new bigbutton right]