How do I get theme path from custom route when using AJAX
Permalink
I have a custom route defined which points to a controller in my application/controllers directory. I'm accessing the route when making an AJAX request. In the request response I need to return some HTML pointing to some images in my theme. I can't figure out how to get the theme path from the custom class because it's not really in the context of the theme. I've tried
but that returns an empty string. I've also tried accessing from
but that break because I'm not actually on a page - it's an Ajax request.
Any help would be greatly appreciated.
\View::getInstance()->getThemePath();
Request::getInstance()->getCurrentPage()
Any help would be greatly appreciated.