I need to pass the custom post type slug as a variable to a custom block made with ACF. This needs to happen when the block is placed for the first time in the editor.
What I want to achieve, is that the block detects the post type and then stores that value so it can be used when rendering the block in the frontend. It can not be done by css classes (that would be the obvious solution). I need to be able to output the CPT slug as a string in the single CPT page.