How to make navigation buttons

Feb 15, 2011 at 8:51 AM


Could you instruct how to create navigation buttons in a SandCastle project? The following buttons are meant: Next, Previous, which are intended to allow end users to navigate between the topics - as an alternative way to the TOC window.

I have a guess to make them as <markup> elements...but probably there is an easier solution.

Thank you in advance.

Feb 15, 2011 at 7:44 PM

If you just want links to the next and previous topics in conceptual content and don't mind manually setting up the links in each topic, a simple <link> element to the previous and next topic will suffice.  If you're using the Sandcastle Help File Builder, you can specify "Next" or "Previous" as the inner text of the link elements so that it shows that text rather than the topic title.  If you're not using SHFB, you can download the Standalone Build Components from the same project site and add the ResolveConceptualLinksComponent that it contains into your conceptual.config file to get the same feature.  SHFB uses it by default so no extra setup is required if using it to manage your project.

If you want a more generic solution that doesn't require you to specify the link targets and works across conceptual and API topics, you would need to write a custom build component since you'd have to load the intermediate TOC file, figure out which topic you were in, and then figure out whether or not to render next/previous links and to which topics, etc.