markus_blue_tomato Posted December 21, 2018 Share Posted December 21, 2018 Is there a way to use https://www.smarty.net/docsv2/de/api.register.function.tpl with this module? Can I access the $smarty class? Link to comment Share on other sites More sharing options...
Wanze Posted December 23, 2018 Author Share Posted December 23, 2018 @tiefenbacher_bluetomato You can us the following hook to extend the smarty object: wire()->addHookAfter('TemplateEngineSmarty::initSmarty', function (HookEvent $event) { $smarty = $event->arguments('smarty'); // Register your function here }); 1 Link to comment Share on other sites More sharing options...
markus_blue_tomato Posted February 27, 2019 Share Posted February 27, 2019 TemplateEngineSmarty is now compatible with TemplateEngineFactory 2.x:https://github.com/blue-tomato/TemplateEngineSmarty 2 1 Link to comment Share on other sites More sharing options...
elabx Posted November 11, 2020 Share Posted November 11, 2020 Hi @markus_blue_tomato ! Just wanted to ask you, I'm trying to throw a 404 on a controller to invalidate some urls but I am getting stuck on getting a 500 error because the exception doesn't get caught, just wondering if you had any experience tackling something like this. Doing this at the end of the controller: if($input->urlSegment1) { $pageOnSegment = getPageToRender(); $view->set('page', $page); } else{ throw new Wire404Exception(); } Link to comment Share on other sites More sharing options...
markus_blue_tomato Posted November 12, 2020 Share Posted November 12, 2020 22 hours ago, elabx said: Hi @markus_blue_tomato ! Just wanted to ask you, I'm trying to throw a 404 on a controller to invalidate some urls but I am getting stuck on getting a 500 error because the exception doesn't get caught, just wondering if you had any experience tackling something like this. Doing this at the end of the controller: if($input->urlSegment1) { $pageOnSegment = getPageToRender(); $view->set('page', $page); } else{ throw new Wire404Exception(); } Hm, not yet... Maybe @Wanze has an idea? Link to comment Share on other sites More sharing options...
elabx Posted November 12, 2020 Share Posted November 12, 2020 1 minute ago, markus_blue_tomato said: Hm, no yet... Maybe @Wanze has an idea? Thanks!! I know @Wanze is now a bit disconnected of the ProcessWire world that's why I haven't tagged him but seems like my last hope ? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now