Skip to content

Toutouwai/PageActionIncludeFile

Repository files navigation

Page Action: Include File

A generic action for Lister Pro allowing the selection of a PHP file containing the action code.

This can be useful for quickly applying API processing to pages without going to the trouble of creating a custom Page Action module for the purpose. Large quantities of pages can be processed thanks to Lister Pro's feature that splits the pages into chunks.

Usage

The module creates a folder at /site/templates/PageActionIncludeFile/ on install. Place your PHP files inside this folder. Within each file, the $item variable refers to the page that is currently being processed. There is no need to save the page within your code because Lister Pro does this automatically.

Example action file: append_foo_to_page_title.php

<?php namespace ProcessWire; /** @var Page $item */ // Append " foo" to page title $item->title .= " foo";

Enable the PageActionIncludeFile action in the config of one or more Lister Pro instances.

PageActionIncludeFile image 1

In the Lister Pro instance, set the filters or select the pages as needed and then choose the "Include File" action. Use the select field to choose a file you have added to /site/templates/PageActionIncludeFile/.

PageActionIncludeFile image 2

Click "Execute" to apply the action.

About

A generic action for Lister Pro allowing the selection of a PHP file containing the action code.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages