We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#846 (comment)
This is the reason why pages added from plugins can't be ajaxified.
Once this has been fixed, a plugin will be able to add an ajaxified page using the filter:server.create_routes hook like so:
filter:server.create_routes
fs.readFile(path.resolve(__dirname, './partials/shoutbox.tpl'), function (err, tpl) { custom_routes.routes.push({ route: constants.global.route, method: "get", options: function(req, res, callback) { callback({ req: req, res: res, content: '<script>templates.ready(function(){ajaxify.go("' + constants.global.route + '", null, "' + "shoutbox" + '", true);});</script>' }); } }); custom_routes.api.push({ route: constants.global.route, method: "get", callback: function(req, res, callback) { callback({}); } }); custom_routes.templates.push({ "template": "shoutbox.tpl", "content": tpl }); callback(null, custom_routes); });
The text was updated successfully, but these errors were encountered:
As usual, PR please 😄 (If there already is one, link to it and close this issue 👍 )
Sorry, something went wrong.
I don't know how you guys would prefer to have this done, but I'll give it a go and see if you guys agree.
Thanks again @MrWaffle, works perfectably.
No branches or pull requests
#846 (comment)
This is the reason why pages added from plugins can't be ajaxified.
Once this has been fixed, a plugin will be able to add an ajaxified page using the
filter:server.create_routes
hook like so:The text was updated successfully, but these errors were encountered: