Routing to Theme Page

I want to use a specific routing to a page residing inside

themes/myTheme/pages/special.htm

in the documentation under

(https://docs.octobercms.com/3.x/extend/system/routing.html)

there is

Route::any('/', function () {
    // ...
});

how can i use a router which call this page?

for example

Route::any('/special', function () {
    // the theme page is returned themes/myTheme/pages/special.htm
});

like laravel way

return view('user.profile', ['user' => $user]);

Thanks alot

Route::any('/special', function () {
    $url = \Cms\Classes\Page::url('special');
    return \Redirect::to($url);
});
1 Like

@apinard thanks alot. Works like a charm.

1 Like