I can’t seem to get page templates to function with soberwp’s controllers. The “default” hierarchies seem to work fine. e.g. a page called “members” will pick up controllers/PageMembers.php or controllers/Page.php if PageMembers.php doesn’t exist. FrontPage.php works fine for the page defined as the front page, etc. It’s just the use of page templates I can’t get to work.
Example:
- I have a page called “Legal & Ethics”, with a parent page called Members"
- URL is mysite.com/members/legal-and-ethics
- This page has a Page Template called “Section Page”
- /views/section-page.blade.php defines the page template named “Section Page”
- This blade template is used properly
- a matching /controllers/SectionPage.php defines a class named SectionPage
- The class is not used, instead Page.php is used
The Hierarchy debugger outputs this:
Hierarchy Debugger:
controllers/app.php
controllers/index.php
controllers/resources/views/singular.php
controllers/singular.php
controllers/views/singular.php
controllers/resources/views/page.php
controllers/page.php
controllers/views/page.php
controllers/resources/views/page-76.php
controllers/page-76.php
controllers/views/page-76.php
controllers/resources/views/page-legal-and-ethics.php
controllers/page-legal-and-ethics.php
controllers/views/page-legal-and-ethics.php
What am I missing?