MarkE Posted May 1, 2020 Share Posted May 1, 2020 Context: I have a (html) table of financial data in a back-end dashboard. Each element of the table is the sum of values from certain pages (for which a selector has been constructed). What I want to do is add a link for each element to a lister page showing the pages that go to make up the element. i.e. a link to a lister page which uses the constructed selector. This sounds like it ought to be easy, but I've been chasing around for a while now and can't seem to crack it. What I've tried: supply a GET var with a csv of the required page ids - /?open=1,2,3 - this seems to have no effect; use ProcessPageLister::addSessionBookmark() - I can't find much documentation about this, particularly regarding the format of the $bookmark array to be supplied. I tried the array structure I inferred from the code, viz: ['id' => , 'title' => , 'desc' => , 'selector' => , 'columns' => , 'sort' => , 'share' => ] but the selector seems not to be recognised (all pages are selected); use a session var to communicate the selector to a hook before ProcessPageLister::renderResults - at least with this, the selector gets recognised, but it will be messy to operate because multiple selectors would be required to handle all the table elements (or some js would need to be added to see which one was clicked) I really feel it ought to be easier than this and that I'm missing something obvious. Can anyone shed some light please? Link to comment Share on other sites More sharing options...
MarkE Posted May 1, 2020 Author Share Posted May 1, 2020 Some progress: looks like you can use the properties listed in the ProcessPageLister module as the keys in the bookmark array - certainly initSelector works. Link to comment Share on other sites More sharing options...
Martijn Geerts Posted May 1, 2020 Share Posted May 1, 2020 If I do understand you correctly I have build a Module for this some years ago: https://github.com/Da-Fecto/ProcessPageListerUrls Haven't used it in ages, but maybe it stil works. 2 Link to comment Share on other sites More sharing options...
MarkE Posted May 1, 2020 Author Share Posted May 1, 2020 On 5/1/2020 at 8:29 PM, Martijn Geerts said: I have build a Module for this some years ago That's the idea. However, I have decided to use ProcessPageLister::addSessionBookmark() now I've got it working, as it doesn't suffer from the problem of altering the default filters. All works fine now and I have a lovely drill-down effect ? EDIT - actually the default lister settings are still affected ? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now