Chunks for forms and control panels

PubKit uses template chunks for two kinds of administrative page: forms for input and tables of items with command links for overview and management.

Input forms are fairly standard HTML forms with the "item edit" page as their action attribute. Forms may be defined in normal MODx chunks, or can be files in the pubKit/chunks folder with names like chunk.news.html, specified in the snippet call as &formtpl=`@FILE:news`.

Management list templates usually require each item to be framed as a table row, with TD cells for data and commands such as:

The PubKit E1.0 sample pages also demonstrate in the News Management page the use of jQuery to reduce the number of form elements needed, and to offer multiple-selection actions (e.g. archiving a whole bunch of items) in conjunction with a suitable snippet.

The example chunks often use Ditto, with PHx to format output strings for colour-coding or to present data selectively according to the item's status. The package includes custom PHx modifiers to assist this.