Methods
Create Custom Page
This method allows you to create a custom page type. This is useful if you want to create a page that is not passed within the theme.
There are 3 types of Custom Pages: redirect to another page, custom HTML and JSON Api.
-
endpoint is stuff after url to your project. For example, endpoint: /test/stuff will be accessible from the localhost/test/stuff URL. Localhost can be also your domain or IP adress.
-
getDataFunction function is function to get data to return. For redirect, it will be an URL string. For custom HTML, it will be HTML string. For JSON Api, it will be an JSON Object.
Where user is logged-in user or null.
Redirect to URL
Render HTML
Send JSON
Example Usage
Props
The path the page will be accessible from.
Was this page helpful?