tmo207 Posted September 26, 2017 Share Posted September 26, 2017 Hi, I want to create a page via API, but when using "new Page();" in my Code, I get the following error: Error: Uncaught Error: Class 'Page' not found in /homepages/37/d660176560/htdocs/ProcesswireProject/site/templates/home.php:67 Someone familiar with that? Link to comment Share on other sites More sharing options...
abdus Posted September 26, 2017 Share Posted September 26, 2017 Put/replace <?php namespace ProcessWire; at the first line of the template. 2 Link to comment Share on other sites More sharing options...
tmo207 Posted September 26, 2017 Author Share Posted September 26, 2017 Wow, that easy. Works now, thank you very much! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now