#
Locutus
Hello,
I'm trying to build a simple gallery module based on the standard Downloads module and other bits and pieces and it's coming along nicely.
However, one problem I seem to be unable to find a solution for. This issue also exists in the standard Articles module which uses the pager control.
The problem is that I seem to be unable to remember the current page of the pager after clicking on an item in the list it pages. I would like to know that page, so I can go straight back to that page from the item page, instead of always back to the first page.
This is my navigation structure:
[ Albums ] -> [ Photos ] -> [ Photo ]
The Albums and Photos page each have a pager. From the Photo page I want to jump back to the right page of Photos, and on the Photos page I want to jump back to the right page of Albums.
I made vars to store the pageindex of both pagers in the base module, and can set them nicely in the pagechanged events of the respective pagers.
Unfortunately, when loading the "child" page, the base module is "recreated", and I lose my previously stored values.
Is there a good way to deal with this? I know it's a tiny detail, but I'd like to get this right. If remotely possible I would like to avoid ViewState and QueryString.
Thanks!
I'm trying to build a simple gallery module based on the standard Downloads module and other bits and pieces and it's coming along nicely.
However, one problem I seem to be unable to find a solution for. This issue also exists in the standard Articles module which uses the pager control.
The problem is that I seem to be unable to remember the current page of the pager after clicking on an item in the list it pages. I would like to know that page, so I can go straight back to that page from the item page, instead of always back to the first page.
This is my navigation structure:
[ Albums ] -> [ Photos ] -> [ Photo ]
The Albums and Photos page each have a pager. From the Photo page I want to jump back to the right page of Photos, and on the Photos page I want to jump back to the right page of Albums.
I made vars to store the pageindex of both pagers in the base module, and can set them nicely in the pagechanged events of the respective pagers.
Unfortunately, when loading the "child" page, the base module is "recreated", and I lose my previously stored values.
Is there a good way to deal with this? I know it's a tiny detail, but I'd like to get this right. If remotely possible I would like to avoid ViewState and QueryString.
Thanks!