Extends the Processwire PageTable field for rendering table row layouts. This is great for editors, because they actually see at a glance what the table rows consist of.
Turns the Processwire Fieldtype "Page Table" from this:
into something like this:
Check this for seeing the rows rendered. You can easily turn off the complete functionality by unchecking this.
If you use a delegated template approach, please provide your path to the templates (relative to templates directory).
If checked, unpublished PageTable parts are rendered collapsed and can be opened on click.
Since the parts are unstyled by default, it is a good idea to define styles for them. All rendered templates are encapsulated in a div with the class "renderedLayout" so you can style them with:
div.renderedLayout h2{
color: green;
}
An option "PageTableExtended" is passed to the rendered templates when rendered from this module. With that you can render customized code for your PageTableExtended template or just alter the current one. Like this:
if($options['pageTableExtended']){
echo "this is rendered in admin: {$page->title}"; // we are in Admin section
} else {
echo "this is the frontend: {$page->title}"; // we are in the frontend
}
The path is to be set relative to your templates' folder.
The rendered parts get the status of the page as CSS class:
Since the parts are rendered inside the Admin, common styles of the Admin Interface apply also to your layout parts. This is not a bad thing, because especially text styles are well integrated in your admin's theme. But if you like to override the admin styles in your table rows completely (more or less), just check this box. Don't forget to define a custom CSS then!
Since this module is meant for parts of your layout you already have defined for your frontend templates, it is a good idea to use a preprocessor like Stylus, Sass or Less for building the custom CSS file. Just outsource your layout part definitions in an extra file, compile that in a separete CSS file and use this as custom CSS for this module. Since your CSS should be built in a modular way, this works pretty well ;-) Will write a tutorial with a use case once finished testing.