0

I have this link in a channel entry list template:

<a href="{site_url}/{segment_1}/{url_title}#primary">

It works fine until page 2 and beyond. It's like ExpressionEngine's pagination is stripping off the #primary anchor. Anyone know what's going on here?

1

So jchrono-battle is correct in that anchor tags (properly known as fragment identifiers) are never sent to the server, but that doesn't seem to be the issue. OP stated the issue is the anchor is never being rendered to the page, not that the server doesn't know what the anchor is.

I would check to be sure that any templates, snippets, embeds, etc. are named properly and all needed data is being included as expected. I suspect this is a user error rather than an EE error.

1
  • Ugh. My issue ended up being a reference to an old embed that I had renamed but failed to change all references to. Thanks Twan!! Apr 2 '15 at 20:21
0

I just answered something like this so I'll give you same answer:

Anchor tags are never sent to the server, and EE can't strip them from your urls.

However, you most likely have an addon on that template that IS doing a redirect to itself. In that situation, it can't see your anchors anyways, so it can't redirect you somewhere with a client side anchor after the URN because it doesn't see them. Or your local machine (browser) is stripping them. Not sure.

But I'd definitely guess you have a redirect issue, like a {segment_1} is making EE redirect because it doesn't exists.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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