Skip to content
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

Add a function for checking the block existence in a page template #43967

Open
rku4er opened this issue Sep 8, 2022 · 0 comments
Open

Add a function for checking the block existence in a page template #43967

rku4er opened this issue Sep 8, 2022 · 0 comments
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Type] Discussion For issues that are high-level and not yet ready to implement. [Type] Enhancement A suggestion for improvement.

Comments

@rku4er
Copy link

rku4er commented Sep 8, 2022

Templates and template parts contain block markup that represents blocks and block settings. Is it possible to make a function which will parse the current page template and check whether a particular block is presented in the template? This function should also work for the Site Editor and such pages like search, archives, 404. So to look not only in post_content. For example it should be possible to detect whether a search block is added to the page header. The common use case - loading custom assets for core blocks after they are rendered.

@artemiomorales artemiomorales added [Type] Enhancement A suggestion for improvement. [Feature] Full Site Editing [Type] Discussion For issues that are high-level and not yet ready to implement. [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") labels Sep 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Type] Discussion For issues that are high-level and not yet ready to implement. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants