joer80 Posted July 17, 2014 Share Posted July 17, 2014 Is it possible to make an admin module read query strings? I made a reports module for a reports page and want to be able to click a link, and it pass a query string for details for that line item. Is there a better way to do it? Thanks! Link to comment Share on other sites More sharing options...
diogo Posted July 17, 2014 Share Posted July 17, 2014 Of course! Just have a look at how the admin works: .../processwire/page/edit/?id=1031 In that particular case, the query is handled by the ProcessPageEdit module with the following line: else if(isset($_GET['id'])) $this->id = (int) $_GET['id']; 1 Link to comment Share on other sites More sharing options...
joer80 Posted July 17, 2014 Author Share Posted July 17, 2014 Awesome! Do you know if there a away to cache an admin page for x minutes? I got it working on a template page but not sure if it is different or not in a module. Thanks! Link to comment Share on other sites More sharing options...
Martijn Geerts Posted July 17, 2014 Share Posted July 17, 2014 For caching individual parts checkout MarkupCache. https://processwire.com/talk/topic/7-new-markupcache-module/ Link to comment Share on other sites More sharing options...
joer80 Posted July 17, 2014 Author Share Posted July 17, 2014 Will that work inside an admin process module? Link to comment Share on other sites More sharing options...
Martijn Geerts Posted July 17, 2014 Share Posted July 17, 2014 Yep it does. If not installed, calling the MarkupCache like below will install it and function. $cache = $this->modules->get("MarkupCache"); // See the $this-> call if(!$data = $cache->get("something")) { $data = "test me"; $cache->save($data); } return $data; // contains "test me" 3 Link to comment Share on other sites More sharing options...
joer80 Posted July 17, 2014 Author Share Posted July 17, 2014 Awesome! Thanks! 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