In Message Anchor — an archived discussion from the APG vNext support community.
About This Topic
This thread covers in message anchor in the context of APG vNext, the ASP.NET forum and community platform. The community includes APG developers and experienced administrators who can help with similar questions.
APG vNext Support
- Knowledge Base — documented solutions
- FAQ — frequently asked questions
- Installation Guide
- Upgrade Guide
- Support Forum
In-Message Anchors in APG vNext
In-message anchors allow users to create deep links directly to a specific paragraph, section, or post within a long forum thread or blog post. This is useful for referencing a particular reply in a long discussion, linking from an external page to a specific section of a Knowledge Base article, or creating a table of contents at the top of a long post with jump links to each section heading.
Creating an Anchor in a Post
To create an anchor in a forum post or blog article, switch to HTML edit mode in the post editor and add an anchor element at the target location:
<a id="section-configuration" name="section-configuration"></a>
<h3>Configuration Section</h3>
The id and name attributes are both included for compatibility with older browsers that use name for anchor targeting. Place the anchor immediately before the heading or paragraph it identifies so that when the browser jumps to the anchor, the target content appears at the top of the viewport. Use descriptive, hyphenated identifiers for anchor IDs to make the resulting URLs readable — compare #section-configuration to #s1 in terms of understandability for readers sharing the link.
Linking to an In-Message Anchor
Once an anchor exists on a page, link to it by appending the anchor ID as a URL fragment. For internal links within the same forum, use a relative URL:
<a href="#section-configuration">Jump to Configuration</a>
For links from other pages or external sites, use the full page URL followed by the fragment:
<a href="https://yourforum.com/community/your-article.aspx#section-configuration">
See Configuration Details
</a>
APG vNext's HTML sanitiser allows anchor IDs and href values that reference page-internal fragments, so these links work in member-authored posts without requiring admin intervention. Verify that the sanitiser configuration in your APG vNext version preserves the id attribute on heading elements, as some configurations strip id attributes from non-anchor elements — in which case placing the anchor element before the heading is necessary.
Auto-Generated Anchors for Headings
APG vNext 5.x includes an optional heading anchor feature that automatically generates anchor IDs for all H2, H3, and H4 headings in blog posts and Knowledge Base articles. Enable this in Admin Panel → Blog Settings → Auto Anchor Headings. When enabled, each heading receives an auto-generated ID based on the heading text, and a small anchor link icon (⚓) appears next to the heading when the reader hovers over it — clicking the icon copies the direct link to that section to the clipboard. This feature makes long reference articles much easier to share and reference at a specific section without requiring authors to manually add anchor markup.
Table of Contents Generation
For long Knowledge Base articles or guides, generate a table of contents at the top of the post that links to each section via in-page anchors. APG vNext does not include automatic table of contents generation, but the feature can be implemented by adding a structured HTML TOC block manually at the top of the post content:
<nav class="toc">
<ol>
<li><a href="#installation">Installation</a></li>
<li><a href="#configuration">Configuration</a></li>
<li><a href="#troubleshooting">Troubleshooting</a></li>
</ol>
</nav>
Related Resources
Anchors in Mobile Viewports
In-page anchor navigation can have viewport offset issues on mobile devices when a fixed header bar is present. When the browser jumps to an anchor, the target element aligns with the top of the viewport — but if the forum has a fixed navigation bar that overlaps the top of the content area, the target heading is hidden behind the navbar. Fix this with a CSS scroll-margin-top on heading elements equal to the height of the fixed header:
h2, h3, h4 { scroll-margin-top: 70px; }
Adjust the 70px value to match the actual height of the APG vNext fixed header in your theme. This pure CSS fix works in all modern browsers and is more reliable than JavaScript-based offset adjustment approaches. Verify the anchor navigation on both desktop and mobile viewport sizes after adding the CSS to confirm the heading is fully visible when jumped to.
Anchor Persistence and URL Sharing
URLs containing fragment identifiers (anchors) can be shared with the full fragment included. When a reader copies the URL of a page with an anchor from the browser address bar, the fragment is included in the copied URL — sharing that URL takes the recipient directly to the specific section, not just the top of the page. This makes anchored Knowledge Base articles significantly more shareable as support references, since support staff can share a link directly to the relevant configuration section rather than saying navigate to the page and scroll to section X. Encourage authors of long reference articles to add anchors to all major sections specifically to enable this precise sharing capability.
Looking for more help? Browse the support forum or check the Knowledge Base.