Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I've been reading that named anchor tags don't work in SharePoint 2010 Server; these are the tags that allow you to jump to a part of a page. In other words, the core.js functionality will prevent you from using /mypage.aspx#myanchor to get to this anchor:

<a name="myanchor"></a>

I've been looking at doing named anchors via the UI but can't seem to find it. Plus these two articles say it wouldn't work anyway: Sharepoint 2010 and Anchor Tags and http://social.msdn.microsoft.com/Forums/en/sharepoint2010general/thread/f7eab808-da8a-44fd-9933-f9b992f5affc

Is it true that named anchors (to allow users to jump to a part of a page) don't work in SP2010? If they work, how do you implement it for non-HTML folks who want to add them to pages without editing HTML?

Thanks.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

Anchors always work - they are part of the html specification.

Now, it is quite possible that a script overrides the behavior, and apparently this is what happens in SP 2010.

Try the following tests on a public page:

Test 1: link with anchor (one step)

http://sp2010.pathtosharepoint.com/SharePoint-User-Toolkit/default.aspx#mainContent

You can see that the page goes to the anchor, but then goes back to the top of the page.

Test 2: First use the URL without the anchor:

http://sp2010.pathtosharepoint.com/SharePoint-User-Toolkit/default.aspx

Then add the anchor:

http://sp2010.pathtosharepoint.com/SharePoint-User-Toolkit/default.aspx#mainContent

In this case, the anchor works because the page is already loaded.

As for the second part of your question, you can use a Content Editor Web Part to add html without editing the page itself.

share|improve this answer

Html named anchors work for me fine.

http://social.msdn.microsoft.com/forums/en-US/sharepointcustomization/thread/9b8ee182-c916-4469-a217-dcacc9824bfa/

share|improve this answer
    
Welcome Exclusive to SharePoint StackExchange, while your answer may potentially answer the question, it doesn't explain why the links may be of use. An extract at the minimum highlighting the fix would be desirable. Please refer to the full FAQ[1] on how to use SharePoint StackExchange. ENJOY [1]: sharepoint.stackexchange.com/faq –  Hugh Wood Nov 29 '12 at 9:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.