Q: Creating and linking to anchors in the KB
You can use anchors to link to specific locations in KB articles.
Create an Anchor
You can create an anchor in a KB page using the {anchor} macro by inserting it in your article where you want to link as follows:
{anchor:anchorname}
Note:
- Don't use special characters or spaces in anchors. They can cause issues with some kinds of linking.
- The anchor name is case sensitive. You must use the same pattern of upper and lower case letters when creating the link as you used when creating the Anchor macro.
Linking to an anchor
You can link to an anchor from within the page the anchor is on, another KB page or even outside the KB.
link to an anchor on the same page
This is really easy. Simply link to #anchorname.
[Link Text|#anchorname]
Example:
[Link to an anchor from another KB page|#anotherKBpage]
This example takes you to the next section, Link to an anchor from another KB page
Link to an anchor from another KB page
Linking to an anchor from another KB page is simple. Simply link to the page as usual, and at the end of the wiki link add #anchorname.
The format:
[Link Text|wiki-link#anchorname]
An example:
[Knowledge Base Best Practices: Linking|handbook:Knowledge Base Best Practices#kblinking]
This example takes you to the linking section of the Knowledge Base Best Practices: Linking
Link to an anchor from outside the KB:
Linking to an anchor from outside the KB is a little trickier. Link to the page as usual, and at the end of the wiki link add #PageTitle-anchorname. Note that the page title has had all the spaces removed. Also note that anchors are case sensitive, so you must use the same capitalization as in the original anchor. Unfortunately, this does not work with the short link, so be sure to use the full link. You can copy that from the address bar of your browser.
The format:
ArticleLink#articlename-anchorname
An example:
http://kb.mit.edu/confluence/display/handbook/Knowledge+Base+Best+Practices#KnowledgeBaseBestPractices-kblinking
This takes you to Knowledge Base Best Practices: Linking