I am using a Site Helper Controller to handle a certain wildcard URI which uses a slug in the URI to fetch content from a third party API and render the page (or throw a 404 if the URI is invalid). The issue is I need to render a theme template, with a variable containing content from the third party API, but this doesn't seem to be possible.

It seems I could instead use a tag for this, parsing the URI from there and throwing a NotFoundException if no content is found on the third party API. This seems a bit backwards to me. A controller makes more sense but is it possible to render a theme template from there? Or is a tag the best practice for this kind of thing in the Statamic world (despite the need to potentially throw a 404)?

Thanks, Mike

Answered by Mike Hayes! Go to answer.