We've retired the forum in favor of GitHub Discussions.

New conversations can be started on GitHub. Existing conversations will remain for a while longer.

Head over to GitHub →

Return a theme view from a Site Helper Controller

Taylor Collins February 28, 2019 by Taylor Collins

Is it possible to return a theme view from a Site Helper Controller Route?

When I try the following from the controller:

return $this->view('sample');

I get the following (and sample.html does exist in the theme templates folder):

InvalidArgumentException in FileViewFinder.php line 137:
View [sample] not found.

The documentation shows how to return the string "Bacon", but not a view: [https://docs.statamic.com/addons/site-helpers#controllers]

Answered by Erin Dalzell!
>>>>>>> Answered <<<<<<<
10 Replies
2 Followers