About PLUs (Page Lister URLs)
Link to listerpages with predefined settings.
Category 1 | Process Modules Process modules are apps that run in the ProcessWire admin. |
---|---|
Category 2 | Other Modules Modules that have a unique purpose not covered by existing categories. |
Release State | Alpha Non-stable. Not yet intended for use in production environments. * |
Author | |
Module Version | 0.0.3 |
Class Name | ProcessPageListerUrls |
Compatibility | 3.0 |
Date Added | December 15, 2016 |
Last Updated | December 17, 2016 |
Recommended By | New recommendations may take up to 1 day to appear. |
Instructions
This module's files should be placed in /site/modules/ProcessPageListerUrls/
How to install or uninstall modules
README
ProcessPageListerUrls
Create links to specific ListerPages with predefined selector, column and sort settings.
What the Module does
This module is intended to be used as helper module within your own modules. The module allows you to create “runtime” bookmarks for ListerPages.
The url() method will build an URL and will redirect you to a specific List Page with predefined select, column and sort settings.
The url method has 5 parameters:
- $ListerPage, Page, Required value, the page where the lister lives.
- $initSelector, String or empty string, The init selector of the lister.
- $defaultSelector, String or empty string, The default selector of the lister.
- $columns, array or empty, plain array with fieldnames.
- $defaultSort String, Where to sort on.
API usage
// Listerpage, the destination.
$listerPage = $pages->get(1234);
$initSelector = 'template=basic-page';
$defaultSelector = 'title!=ProcessWire, parent.id>1234';
$columns = array('title', 'template', 'parent', 'modified');
$defaultSort = 'modified';
// Get the instance and build the URL. You need only 1 instance to create multiple URLs.
$plus = $modules->get('ProcessPageListerUrls');
$url = $plus->url($listerPage, $initSelector, $defaultSelector, $columns, $defaultSort);
About the URL
The builded URL is encoded using openssl_encrypt, abstracted and cut in get variables with a max length of 256. This way the client can't manually change the url, so it is save to use init selector.
Be aware
Be aware that the runtime bookmarks will change settings in your lister config. When you enter the config after using ProcessPageListerUrls and save the lister those settings are also saved, this is the 'nature' of ListerPro
Thanks
- This Module is sponsored by Calago, thanks!
- Thanks to Arjen Blokzijl for support & testing
- Thanks to Ryan Cramer
Comments
No comments yet. Be the first to post!
Post a Comment
Your e-mail is kept confidential and not included with your comment. Website is optional.
- Admin Helpers
- Core Modules
- Development Tools
- Field Types
- File Validator
- Import/Export
- Input Fields
- Language Modules
- Language Packs
- Logs/Monitoring
- Markup Generation
- Photo/Video/Audio
- Premium Modules
- Process Modules
- Proof of Concept
- SEO/Accessibility
- Site Profiles
- Social, Feeds, Services
- Text Formatters
- Other Modules
- Users and Access
Disclaimer
*Use modules at your own risk. There are no guarantees or warranties. It is recommended that you backup your site and database before installing new modules.