I added a new page in this hierarchy:
CRM/Mymodule/Page/subdir/MyPage.php
and added a template file at
templates/CRM/Mymodule/subdir/MyPage.tpl
.
But when I run MyPage.php, I get a blank page. Template contents aren't displayed. Adding smartyDebug=1 to the URL doesn't trigger a popup either. Strangely though, if I var_dump a variable, I can see the page with menu bar, page title and the variable info. So MyPage.php is being invoked.
Is it that pages don't support subdirectories? I tried adding the template file using Region. That didn't work either.
UPDATE:
I created a page and a corresponding template on CRM/Mymodule/Page/MyPage.php
and templates/CRM/Mymodule/MyPage.tpl
respectively and manually wrote a route. It didn't work. I then used civix to generate the same page and template. It worked. So, is it compulsory that we create using civix
? But I had manually created the form and it had worked.