theqbap Posted October 11, 2018 Share Posted October 11, 2018 Hello everyone! I'm using ProcessWire to run my webpage, and I'm always looking for articles and post to fix or improve some thing on the forum. I'm using now DISQUS for comments on my ProcessWire webpage ex. Avast Free Antivirus download, but it's heavy. The best solution would be to switch to fieldtype Comments. The trick part is that I'm using a hook to rewrite the URL for SEO reasons, I code a redirect mode based on page id -> https://kubadownload.com/avast-free-antivirus-download.1223.html wire()->addHookAfter('Page::path', null, 'hookPagePath'); function hookPagePath(HookEvent $e) { $page = $e->object; if($page->template == 'template-name') $e->return = "$page->name" . "." . "$page->id" . ".html"; Of course I can install the Comments field, but it's now working. When I add a comment it redirects to home page, and it's not saved to database. Any ideas how can i fix this? Every help would be highly appreciated ? 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