Jump to content

Custom page class does not work by alternate template file


Migu
 Share

Recommended Posts

If I specify an alternate template file, the custom page class does not work, an exception appears "Method Page::getTest does not exist or is not callable in this context" what can I do? Thanks for your help.

Link to comment
Share on other sites

Hi @jmclosas,

Could you give more informations on your code, and the complete stack trace?

I have a template "game-championship-summary" that uses the template file "events-summary", the custom class is named GameChampionshipSummaryPage, and this is working.

I bet you wrote the $page->getTest() yourself (or it comes from a module), because in ProcessWire core I can't find a single "getTest". ?

Edited by da²
Link to comment
Share on other sites

Thank you very much for your answer. I have understood it now, I had the template with grid and the template file is grid-template if I now use GridPage then it works. Thank you very much for your quick answer ?

 

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...