MadeMyDay / PageTableExtended

Extends the Processwire PageTable field for rendering table row layouts.
15 stars 11 forks source link

Update InputfieldPageTableExtended.module #1

Closed Notanotherdotcom closed 10 years ago

Notanotherdotcom commented 10 years ago

Module actually breaks in some template delegation scenarios (the content of the PageTable page gets displayed on the frontend instead of showing the admin edit page!), though it may only be me affected at present.

These changes fetch the template as a separate template object and parse in the data, then render the parsed template so ProcessWire doesn't accidentally render the wrong page.

Not sure if it was affecting other people, but it should work in all obscure template delegation cases anyway and doesn't seem to have any downsides that I can see.

Passed $p to the template too as well as the options array so will be backwards compatible with your current instructions.

MadeMyDay commented 10 years ago

Thanks Pete!

MadeMyDay commented 10 years ago

Pete, what do you think? Does #5 also work for you? Can't test it because I haven't used template delegation atm.