This project has moved and is read-only. For the latest updates, please go here.

Linking additional content from code comment

Topics: Developer Forum, User Forum
Mar 1, 2007 at 4:02 PM
Thanks for your grate project.
I have a stupid question. How can I create a link to a page in additional content from my code comment?
Mar 1, 2007 at 4:09 PM
You can use a normal anchor tag (i.e. <a href="../MyPage.html">Additional Content</a>). See the "How can I embed an image in a namespace, type, or member's help topic?" for information on how the path's are constructed. The concept is the same.

Mar 1, 2007 at 4:21 PM
Thanks a lot. It works!
Sep 17, 2007 at 5:46 PM
I want Sandcastle to go much further--I want it to create these links for me automatically. In the modern era of automated documention, I think this is a basic requirement.

May I compare Sandcastle with Doxygen? Freeware...

Doxygen creates links from the custom topics into the reference in every case, unless you explicitly tell it not to.

Possible problems:

- What happens if there are multiple Person classes in different namespaces?
By creating a more unique reference. In C++, that is ClassName::MethodName().

- How would I simply use the word Greet without it being made into a hyperlink, if I wasn't referring to the Greet method in particular?
Doxygen recognizes the percentage symbol as an instruction to ignore a specific trip. So %Greet tells doxygen not to create a link there; for Greet, a link is creted to the Greet class.

Why should a technical writer have to work so hard to put in all these links manually?

Does anyone know if this is possible currently with SC or with any associated software?
Sep 17, 2007 at 7:02 PM
Edited Sep 17, 2007 at 7:03 PM
If you're refering to links in additional content that point to namespace content, this is already supported. Just use a <see> tag like you would in XML comments. It supports the cref alone or inner text to display different text for the link. It doesn't have to be fully qualified and will try to find the best match based on the cref given. See the help file for details.

Sep 18, 2007 at 12:18 PM
Actually, I am not referring to the ability to create a link explicitly, such as <a href> tags or <cref> and <see> tags.

I am referring to a capability offered by other software, such as doxygen, where these links are created automatically. I guess a parser runs over the texts of those external topics and examples (codes samples) and matches key words (class names, method names) it finds there to items in the Class Reference.

This saves loads of time and is thorough.

See for this feature and others.