Hello,
Sorry, I don’t understand what you mean when you talk about a block template.
Hi,
thanks for your reply.
I load a (I thought it is called like this) block template, to have predefined Gutenberg blocks in a post. The part of SimpLy is this one:
[ 'pgcsimplygalleryblock/grid',
[
'copyRProtection' => false,
'sharePinterest' => false,
'sliderItemDownload' => false,
'shareCopyLink' => false,
'thumbClickAction' => 'useLightbox',
'collectionColumns' => 4,
'thumbSpacing' => 30,
'externalLink' => false,
'captions' => false,
'collectionThumbSubMenuDownload' => false,
'galleryType' => 'pgc_sgb_grid',
'align' => 'full',
'className' => 'hit-gallery',
],
],
It loads an empty SimpLy-block in Gutenberg. I can fill it, but the problem is like described in first post.
I know that it isn’t the way a SimpLy-Block is used usual, but maybe there’s a chance.
As I said, when I reload the gallery before I publish the post, everything works fine. For me, it isn’t a big deal, but I try to make it for dummies, so my other publishers can’t create faults.
Maybe you have an idea. One way could be firing the “reload”-function, before saving the post.
Thank you!
Gallery blocks are dynamic.
Now you are publishing a gallery, which, in principle, should not go to the frontend.
But for experiment try add images => [] to block attributes.
Your task is clear to me and I am ready to help you, but it may be necessary to change something else. It would have been better to have a site for experimentation on the global network rather than locally
Thank you.
Unfortunately adding images => [] to the block attributes doesn’t change anything.
I know it would be better to have the site online. I appreciate that you’re ready to help me. Tell me what you need to get a view into it and I will give it to you.
When I’m adding images to a new gallery in a new post, I can see in the Code, that everything is set correctly. Data-ID is set to every image. Data-link too. It seems to me, that one action isn’t fired, that normally is fired when inserting a new gallery-block by hand.
HAAAAHAAA!
I got it!
Adding 'itemsMetaDataCollection' => [] to the block attributes did the job!
Thank you that much for delivering the idea!
Have a good time!