RFC 0025 - Reusable Content with Global Blocks #35
Replies: 16 comments 11 replies
-
One thing that immediately comes to mind when looking at Global vs Local Blocks, is the scenario where an Umbraco Instance may have multiple sites, each with their own content and scoped to specific content editors. Some Blocks may be okay to be shared amongst the sites, while others should definitely be scoped to the site. We have one client who for example has 8 sites in their instance, each with their own theme and content. They don't want content bleeding from one site to the next. |
Beta Was this translation helpful? Give feedback.
-
I love the idea and the concept I think library is a good section title , and may also be a great place to put any dictionary items long terms I suggest we have a naming convention and grouping as described below ( which is mostly what is described) 2 types Local Global Local
|
Beta Was this translation helpful? Give feedback.
-
This is a great idea and I really like the proposed designs! Below a few questions and remarks. Naming Technical considerations Talking about APIs, will the global blocks be accessible via the new Content API? Is the RFC it's mentioned that these global blocks would be stored in a "new structure". Is this the first step to an overhaul of the content structure? :) Organization within Umbraco Have you considered changing the Content section tree to have a "content" and "global blocks" subtrees instead of having a Library section? Or simply having them just in the content section and they'd be special types (pretty much like the element types for example)? |
Beta Was this translation helpful? Give feedback.
-
I think I agree with the naming Naming this then works really well with a library concept Organisation within umbraco technical considerations Should a block type be allowed by Document type |
Beta Was this translation helpful? Give feedback.
-
I haven't got a fully formed answer right now, but my main thing would be to consider this outside of the context of "blocks". For a while there has been the discussion of having non routable "collections" for lists of things, be that lists of team members, or offices, or recipes etc. I think the library section is a good idea for this, but I would just ensure we are thinking beyond "blocks" and the grid and make sure the concept it useful for more generalized use cases. In these cases it's not just about picking an item from a list, it could be accessing and iterating over the list in it's entirety so what is the API for this? etc etc. |
Beta Was this translation helpful? Give feedback.
-
As an addition to the global blocks I would to add the following: I would like to add thought into the idea that we can create preset blocks for a content node instead of the whole content tree. A lot of times when we have multiple websites in one instance they are split by using different roots (see A and B in the example). For root A I might have a set of blocks and for root B I might have a set of blocks. Also because users might be locked out on the root level. One group might have access to manage root A, and not root B. But they can see the global content. I think it would be a good idea to be able to manage these "global" blocks for a certain tree. So we can preset blocks on tree A and only descendants or A can use these. It shouldn't be limited to root nodes, for example A2 should be able to have their own preset blocks which only A2x and A2y can use. We can achieve this by having a "Library" content app instead of only using a library section. These should follow the library section, but are limited to the content node itself and it's descendants. I can already see the global library be trashed with folders for local content. Using a content app should clean up the general library section because a lot of local content is not in the global library. It hides visibility when a user does not have access to these nodes.
For the library section: I am not a big supporter on it. This is my first thought. Thinking about it makes me realize there is not a lot of truly global content. For me, probably on how I set-up the content tree, there is only "global" content for each content root. Where a content root is the top-level of this content tree, it might also need to be considered as the root for a library functionality like described above. Everything related to the library in this proposal equals content. So it should probably be in the content section. This is just my opinion and I can see other people configuring the CMS differently where a library section might make sense. |
Beta Was this translation helpful? Give feedback.
-
I think this is a great idea and something that would be really useful as it meets a need that most sites have. I really hope this comes to fruition. One thing that hasn't been discussed is this:
This seems like quite a large change. At the moment, blocks are stored as JSON and whilst this has a lot of disadvantages, it does help with performance as you can load all the blocks with one SQL call. If blocks are stored like Umbraco content - with a DB row for each property - then how will this perform when you have to load all the blocks? If you had 10 blocks with an average of 5 properties - and maybe some of those properties could have blocks nested in them as sub blocks - then you could literally be 100s of DB calls to load up the blocks. I know from experience how slow Umbraco can get when loading a lot of content not from cache. So I'd be interested to know how this will be achieved and still keep things like the editor experience snappy? |
Beta Was this translation helpful? Give feedback.
-
The RFC looks good to me. To feedback specifically on the unresolved issues...
Personally, I haven't used the Block Settings feature much, but I can envisage an example scenario where Block Setting reusability could be influenced by seasonal visibility or theming, e.g. at certain times of the year a content author would want to bulk alter block settings to hide or change theme, i.e. Halloween, Christmas, etc. Of course, this scenario could be handled multiple ways within Umbraco. I'm only wondering if there is a technical reason to NOT have the Block Settings be globally available in the Library?
(No opinion, I don't typically work with segments.)
My initial gut instinct would be to name it "Repository", but now even that doesn't feel quite right. I think "Library" is a good choice of name. In terms of other inclusions, selfishly for my Contentment package, I could envisage it potentially housing reusable Data List data-source configurations. I also like the "collections" idea that @mattbrailsford mentioned.
I guess this depends on how the term "Block" will be used in future, as the schema is called an Element Type, which would imply "Global Elements", but even that feels a slightly odd name in the Block editor context. I do like the idea of future property-editors being able to reuse non-routable content, which may not use the "Blocks" terminology, so maybe Elements might be a more generic term? |
Beta Was this translation helpful? Give feedback.
-
My gut often says Keeping the library as flexible as possible will be important, so that it can meet the different use cases already outlined in these comments. Serving it as a separate section makes sense in that the library could have a complex tree (or multiple trees) which would introduce extra complexity if added to the content section. Media is fundamentally content, but we keep it separate, so following the same separation continues to make sense here. A separate section also allows handling scenarios where elements/blocks differ from 'regular' content. |
Beta Was this translation helpful? Give feedback.
-
I suspect that if the total collection is a library, then the specific sections are generically archives or perhaps registers. |
Beta Was this translation helpful? Give feedback.
-
Currently Content Templates are supported/used in Umbraco core at document type/content type lever, but not for element types although I think @leekelleher used these in the Contentment package. I think with resuable/blocks it may make sense to use Content Templates at element type level as well. In a few projects we also had the need to move Content Templates tree to Content section (or remove the core tree and register our own inheriting the core Content Templates tree controller), since content editor could create these, but not edit and delete. So I think it makes sense to move this to a Library section as well by default, yet make in configuable. In the content template has a reference to media and the media is being deleted, it currently link to Settings section, which is hardcoded at the moment. See umbraco/Umbraco-CMS#12764 |
Beta Was this translation helpful? Give feedback.
-
Here are some thoughts based on my experience with building pages with the Block Grid over the last two months: Summary: Shared content can be used in multiple places, not only in the Block Grid and Block List. Sometimes the content is displayed in the resulting UI, and sometimes it's used for configuration purposes. Sometimes the content is global, sometimes it's local to a sub-site, and sometimes it's local to a sub-tree under a sub-site. Hence, consider allowing both content and settings, or simply make no distinction between them. And maybe what we're talking about is just "Shared Content". Terminology
When starting to use the Block Grid I was surprised that 1) we couldn't create reusable "Block Types", and 2) a specific "Element Type" could only be used once in the same grid definition. So, a couple feature requests would be:
Block Contents vs Block Settings - we have had reusable/shared content and settings on our sites, for multiple purposes, since long before blocks. In our content tree we have a node under each site's root called "Shared Content". This node doesn't have a template, and cannot be navigated to from the web. For us there hasn't been a significant distinction between "content" and "setting", but if they need to be distinct, then I would promote allowing both global content and global settings. Here are some of the types of shared content (and settings):
|
Beta Was this translation helpful? Give feedback.
-
Regarding Publishing, Unpublishing and Scheduled Publishing. If a specific layout relied on blocks of certain dimensions and one becomes unpublished, then the layout could end up with un-expected holes, and also would not be as represented in the back office. (is this a concern?) |
Beta Was this translation helpful? Give feedback.
-
I think this feature is a fantastic idea. I was literally trying to research whether such functionality existed yesterday, as I've potentially got a new project upcoming on Umbraco and wanted to see if this concept exists, as it does on other CMS platforms I've been working with. Through my research, I did find an Umbraco theme called Igloo, which includes a Global Content concept: https://igloo-theme-1.gitbook.io/igloo-theme/page-types/global-content. I concluded, therefore, that it's something I'd have to build myself (if not buying such a theme that already includes it), so seeing it being discussed for inclusion in the core CMS is very encouraging. I did initially feel that the Content section would be a better place for it, but agree with the point made by @nathanwoulfe, that Media is also in its own section so why wouldn't this be? I've been out of the Umbraco game for a while, last site I built was on v8(!), so there's probably not much useful contribution I can make in terms of implementation to the current CMS, but just wanted to give a massive thumbs up for the idea, it would be very useful indeed! |
Beta Was this translation helpful? Give feedback.
-
I forgot to add notes to this RFC after CODECABIN 23. Here are the notes I made and blogged about:
|
Beta Was this translation helpful? Give feedback.
-
I like the idea of a Library section for these reusable block, and as stated, perhaps also for other kinds of reusable content like employees in the future. However, I'd like to see some kind ability to selectively override a few properties on a global block. You should be able to indicate that a property on a global block can be overridden on a local instance and then choose to override it on a local instance, while keeping all other properties global. This does of course increase the complexity somewhat, but it would be very useful to have this option. |
Beta Was this translation helpful? Give feedback.
-
Request for Comments: Reusable Content with Global Blocks
Read the full RFC document here.
This RFC discusses adding Reusable Content in the form of Global Blocks to Umbraco. We would love your feedback on the described feature.
How do I contribute?
Most importantly, we don’t want to miss anything, so everything goes in terms of clarifications, questions, suggestions, etc.
Please do the following things if you want to contribute:
Beta Was this translation helpful? Give feedback.
All reactions