How to Create Controller for PageTemplate?
PermalinkI am facing difficulties to create controller for page template, so please share how to create controller for page template.
This script will report this post as spam and add a permanent IP ban for this user, type "DESTROY" below to continue.
We can't create controller for page template like 5.6. But We could create controller to its page type
We can create page type controller using the following method:
For example you have event_details page template . its page type handle name is event. In this case, we need to create file application\controllers\page_types\Event.php
its code will be like this