-
Notifications
You must be signed in to change notification settings - Fork 0
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
Experiment with ServerSideRender #16
Comments
…shortcode. Uses simple string attributes: v, p and m
See #12 for a summary of required blocks. |
While developing the Fields block I discovered that the version of The code was changed in PR 8720, but there don't appear to be any deprecation notices. Perhaps there should be a summary of where to import components from. |
If you register a Server Side Rendered block with
then you have to ensure that these fields are registered in the PHP. The problem only occurs in the editor. When the post is displayed there isn't any checking. Need to confirm what in the client end sets Also, it's not a good idea to set supports.html: true for this type of block. |
Closing this. I've developed a number of blocks that use Server Side Rendering. I experienced quite a few problems along the way. But I reckon I've got it sussed now. See bobbingwide/oik-bob-bing-wide#42 |
Gutenberg provides a mechanism called
ServerSideRender
which allows a block to be rendered by the server. It’s intended for legacy code, which is exactly what some of the shortcodes are. We should experiment with this solution to attempt to render the real block that’s displayed for a subset of shortcodes.Starting with:
For some logic the server side rendering may require the global $post to be set.
Other logic needs to know the current user.
The text was updated successfully, but these errors were encountered: