Package Development default.php instead of view.php being used for displaying single page
Permalink
Hi There,
I am using concrete5 5.6 and I am developing a C5 Package with the following structure:
The installation of the Package worked and the single page got created correctly.
The Code to Create the single page:
When I now navigate to the single page with the url
I am getting the standard default page displayed with the page template default.php, instead of my view.php from the package. It seems that it is using the wrong page template or the controller of the package might not being invoked at all.
The view.php file of the single page:
The controller.php of the single page
The view.php file within my Page Theme folder exists and and is getting called correctly by other packages from the market place. I also used this package structure for other packages on other sites and it worked.
Am I doing something wrong?
Thanks for your help
Best Jan
I am using concrete5 5.6 and I am developing a C5 Package with the following structure:
jw_foto_commerce - controllers -- school_photography -- picture_set -- controller.php - single_pages -- school_photography -- picture_set -- view.php
The installation of the Package worked and the single page got created correctly.
The Code to Create the single page:
$singlePage = SinglePage::add('/schulfotografie/bilderset', $pkg);
When I now navigate to the single page with the url
"mydomain.ch/index.php/schulfotografie/bilderset"
I am getting the standard default page displayed with the page template default.php, instead of my view.php from the package. It seems that it is using the wrong page template or the controller of the package might not being invoked at all.
The view.php file of the single page:
The controller.php of the single page
class SchoolPhotographyPictureSetController extends Controller{ public function on_start() { } public function view() { // called every time the page is viewed } }
The view.php file within my Page Theme folder exists and and is getting called correctly by other packages from the market place. I also used this package structure for other packages on other sites and it worked.
Am I doing something wrong?
Thanks for your help
Best Jan
Hi John,
Thanks for your answer. The typo was only in the forum post. In my Code it is correct, I just double checked it. I corrected it in the forum post.
Thanks for your answer. The typo was only in the forum post. In my Code it is correct, I just double checked it. I corrected it in the forum post.
I couldn't figure out any more problems and started over..now it works.. :-)
fotography -> photography