Modul ClassExtension should deliver a new template-file aswell

Tags: #<Tag:0x00007f10c8ab1a50>


Hi I ve written a module that extends, let’s say, the PageController::class. To use the new functionality of my ExtendPage::class I need to overwrite the standard with a new one delivered with my module that extends PageController…
How to do that :wink:

thanks in advance



SS4 is all about the namespace, so if you need to create ss template files for the classes that you create, you need to follow the trails.

For example, this is your subclass (of PageController)


namespace App\Web\Layout;
use PageController;

class MyPageController extends PageController {}

Then, the template you are looking for is

or, you can override renderWith() function in your class to add more flexibilities (e.g. if x happens, I would like to use instead)

Hope this helps