![]() |
Hi everyone,
I was interested in adding an anchor to my pager links to make sure that when users navigate through their results, they don't have to scroll back down to them, but rather stay at the same page level. Better user experience... I thought I could add an anchor as a parameter maybe, but looking at the pager documentation, It does not look possible. I thought maybe I could pass a value to the template from my $viewData variable but when I tried, I got an 'undefined variable' error ; the template does not have access to my views variables? In the end I made it work this way: I created 2 different templates, one to be used in my bookings page, with the #bookings anchor I need, one in my presentations page where there are reviews, with the #reviews anchor I need and I select the template to be used in my controller or my view. It works but I feel there could be a better way to avoid having 2 template files where the only thing that changes is an anchor. Can you share your thoughts on the best way to do this? |
Messages In This Thread |
Best way to add an anchor to pager links - by kcs - 04-25-2025, 05:56 AM
RE: Best way to add an anchor to pager links - by grimpirate - 04-25-2025, 01:41 PM
RE: Best way to add an anchor to pager links - by kcs - 04-26-2025, 12:14 AM
|