-
Notifications
You must be signed in to change notification settings - Fork 591
New issue
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
Overriding pageBeforeSend in apostrophe-pieces-pages doesn't work #1341
Comments
Your Complicating matters, |
@boutell I haven't quite understood what I need to do to resolve this problem. |
You're invoking things that take callbacks, and your code is meanwhile returning, so apostrophe goes its merry way and renders your page. Then, later, your data arrives. Oops, too late. So your |
I can successfully overridden pageBeforeSend to get data from the database and send it to a template. I did this in apostrophe-pages using the example in https://stackoverflow.com/questions/40011205/injecting-backend-data-into-view-for-use-in-client-side-js. However, when I try to do the same thing in apostrophe-pieces-pages, the data is not received in the template. This happens when I update the data within the callback of the database call. However, If I update the data outside of the callback of the database call, the data is received in the template.
The text was updated successfully, but these errors were encountered: