This extension integrates the PHP dom manipulator into Contao.
This extension integrates the PHP dom document manipulator into Contao.
This library can be installed using composer
$ php composer.phar require netzmacht/contao-dom-manipulator:~1.0 $ php composer.phar updatet
This extension hooks into the
parseBackendTemplate hook. It provides 4 events:
Netzmacht\Contao\DomManipulator\Events::CREATE_MANIPULATORIt's the event which collects the rules and creates the manipulator.
Netzmacht\Contao\DomManipulator\Events::START_MANIPULATEIt's just a state notification event. It's called before the manipulation starts.
Netzmacht\Contao\DomManipulator\Events::STOP_MANIPULATEIt's just a state notification event. It's called before the manipulation stops.
Netzmacht\Contao\DomManipulator\Events::LOAD_HTMLIt's called right before the html is load into the manipulator. Use it to fix hml if something is going wrong when loading html into the dom.
To get more details how to create rules have a look at netzmacht/php-dom-manipulator.