cofoundry
cofoundry copied to clipboard
Global Block Content
Hi. I want to reuse "Footer" block type. I have multiple templates for different pages (f.e. home, projects), but want to use one footer for all of them. Am I missing something and maybe it's possible right now? Right now footer info is hardcoded into global _Layout, but I think a custom entity can be created for this purpose and accessed by inserting viewcomponent in all templates, that's the only way it can be implemented, as I see it.
Originally posted by @VladMstv in https://github.com/cofoundry-cms/cofoundry/issues/244#issuecomment-566649791
You're right in that a custom entity is the only way to do this now, but it's a bit clunky. The closest thing we'd probably look at next would be #243 which covers global settings and single-object custom entities which would allow you to model the data for your footer in a separate section.
To have global block content we'd need to look at how this would be handled in the visual editor i.e. how the interface would have to change to allow multiple edit context - as a user I'd need to clearly know when im editing data scoped to a page, custom entity or global element.
For now #243 would at least make this kind of thing more intuitive and less clunky.