My page
Ordinary html, plus any custom element the client provides.
Ordinary html, plus any custom element the client provides.
This post does not exist.
isDraft()) {$route->redirect(\MMO\url('blog')); return;} ?> ``` Neither `redirect()` nor `stop()` throws: the rest of the file still runs, so `return` after them. A top-level `return` simply ends the page -- what was echoed so far is kept. `stop()` also lets a page answer something other than html -- an export of the table it shows, a form it handles itself: ```php get('export') === 'xlsx') {$route->stop(Response::Xlsx(buildSheet($stats))); return;} if (($route->isPost()) && ($post = $route->getRequestBody())) { //save $post, then show the page again } ?> ``` A missing *page* is a 404 already: `PageController` throws it, before any page runs, for a path no entry matches -- and for an entry marked `"visible": false`, a 401. ### Escaping A page is php: `= $x ?>` prints raw. Use `htmlspecialchars()` for text, and `\MMO\core\printers\JsonPrinter::Encode()` to hand a value to javascript: ```php