JavaScript for WordPress › Forums › Gutenberg Development › Get content from another site in the network, Rest API? › Reply To: Get content from another site in the network, Rest API?
January 28, 2019 at 9:47 am
#86470
Marky
Participant
Sorted it!
So you can use the ServerSideRender wp component. That looks for the blocks related php file and pulls the output from there into the attributes. Amazing. Thanks for setting me on the right path!
edit( { className, attributes, setAttributes } ) {
return (
<Fragment>
<ServerSideRender
block="ccsblocks/dynamic-factsheet"
attributes={ {
stuff: attributes.stuff
} }
/>
</Fragment>
);