How to anchor in dynamic page

Good Day Everyone,

I have a question regarding anchor, how to apply anchor in dynamic page?

My problem is that I use anchor to specific element in dynamic page. However, all buttons (linked to anchor) goes to same page.

It would be appreciated if you guys teach in details if it is required coding because I do not have knowledge related to coding