Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Fragment Links Auto-Adding to SideBar/Navigation


Go to End


975 Views

Avatar
b00mtastik

Community Member, 18 Posts

2 October 2012 at 2:07pm

Hello again to all,

I'm having a bit of trouble understanding how Fragment Links work in Silverstripe. I have an article on our company intranet that I've created using SS 3.0.2 and while this article is really long because its a tutorial, most users are really lazy to have to scroll. I'm trying to make the navigation a little easier by adding Fragment Links (#Tag Anchors) to quickly jump down the page to a relevant section, which will be clicked on from the sidebar menu.

What is the best approach for this? I could manually add the Fragment Links to the WikiPage.ss and remove the sidebar include and have all article that need it, have its own style of navigation, but I was hoping there would be a better, and more or less automatic way to grab all Fragment Links and add them to the the menu as a listed link, as a child of the current page (In perspective of the sidebar menu).

Thank you in advance for all help put forward.

-B00mer