Here is my website: http://reachoutcelebration.com/

I have another webpage here: http://www.reachoutcelebration.com/pages

When I click on "contact" on the menu of the "pages" page, it should lead you to the main reachoutcelebration.com page with the title Contact section. As you can see, it doesn't. It throws it some place else several hundred pixels above.

Does expression engine have any dandy way to make anchor tags?

2 Answers 2


Your issue is nothing to do with ExpressionEngine.

The template you are uses javascript to smooth-scroll within the page. It appears to be configured properly for in-page scrolling, but not for links arriving from other pages. This is a consequence of how the scrolling utility you are using is written - it needs to check for whether it is being called at page load or not, and if so effectively force a scroll to top of page before then scrolling back to the correct location.

You can fix this a number of ways, but how very much depends on what else you are doing on the page. But you might get some ideas for a way to proceed from other discussions on stackeexchange of the issue - e.g. look at the notes to the first answer to this question - https://stackoverflow.com/questions/14804941/how-to-add-smooth-scrolling-to-bootstraps-scroll-spy-function

More generally, EE is a powerful back-end CMS that gives you total control over how the information is displayed within your website. The upside of this is flexibility, the downside is that for the most part you have to create your own templates to control what HTML is generated; but within these templates your control over how an anchor tag is created is complete. In the light of this, your final question does not make much sense. Perhaps if you clarified what you are trying to do you might get a better answer.

Anyhow HTH.

  • This doesn't seem to help me. I tried the javascript solution. Several of them. Problem remains. My question was that EE has url embed tags, so I thought why not embedded anchor tags. Just wondering.
    – Greg
    Commented Nov 13, 2016 at 1:02
  • Not entirely sure what you are referring to - if you mean the {embed} tag, that's for something quite different: including one EE template within another. Read the documentation here docs.expressionengine.com/latest/templates/embedding.html Commented Nov 13, 2016 at 12:16

After much stress and research, none of the javascript fixes worked. I moved the anchor tag on the other page in an awkward position. It's like the anchor tag pulls the viewport "too high" over the anchor tag making navigating the site disorienting. I manually moved the anchor down. I still have no idea how else to fix it. Marking this one up as ambiguous, until I learn more JS.

  • Perhaps this will help: stackoverflow.com/questions/10732690/…
    – AllInOne
    Commented Nov 14, 2016 at 14:13
  • Greg, the issue is to do with what happens when a page loads. If you smooth scroll to an anchor within a page javascript knows where the viewport is when you start and so can work out which way to scroll and by how much. If you connect from another page (or use a fully qualified URL rather than a relative URL) on opening the page javascript doesn't know where on the page the view port is - and so cannot reliably work out what scroll to do. So you need to 'reset' the viewport on loading (by scrolling top of page and then scrolling to the anchor). See comments suggested in my earlier post. Commented Nov 14, 2016 at 15:00
  • I understand most of what your saying. How can I reset the viewport? Is that fixed through placing my anchors in special spots or more javascript? My skills in JS are very limited (been meaning to work on learning more ASAP) Thank you so much for responding, not once but twice.
    – Greg
    Commented Nov 14, 2016 at 16:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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