I'm creating a "Q & A" website. On the questions page all of its answers could be seen (with pagination). I need to go straight down to answers (in the page) from other pages as well. I've tried implementing named anchors but unable to direct to page section.
Answer's get_absolute_url() returns url in the form:
www.example.com/question-id/question-slug?page=no#aID <!-- EDITED -->
An example url:
www.example.com/question-10/what-is-this?page=2#a20 <!-- EDITED -->
and in html:
{% autopaginate answers 10 %}
{% for answer in answers %}
<div>
<a name="a{{answer.id}}">Answer</a> <!-- EDITED -->
{# answer body goes here#}
</div>
{% endfor %}
{% paginate %}
It redirects to the correct page but not to the correct page section.
EDIT: Result! When clicked, After going to the page section, it bounces to the bottom of the page