What is the best way to seperate the content from the pages

I’d like to know the best approach to separating content from pages.

  • The goal is to enter the content once, and then reference it across different pages.

  • I’d also like to understand whether this approach aligns with common conventions, or if it might break any best practices.

There is no ‘correct’ way to do this at the moment. I know Umbraco is working on the concept of reusable blocks, where you can create a block and reuse it multiple times, but at the moment, that is not finished.

We usually have this content structure

Website container
— Content
——Home ← The one has the culture and hostnames
———Page1
———Page2
——Shared content
———Faqs
———Locations
———…etc
——Settings

So effectively, only pages under ‘home’ have a routable URL. And when you have multiple sites, you simply have more containers:

Website container 1
— Content
——HomeWebsite1 ← The one has the culture and hostnames
———Page1
———Page2
——Shared content
———Faqs
———Locations
———…etc
——Settings

Website container 2
— Content
——HomeWebsite2 ← The one has the culture and hostnames
———Page1
———Page2
——Shared content
———Faqs
———Locations
———…etc
——Settings

We do the same as Luuk and it’s been working great.

There is some small gotchas that can arise from this setup if you have user group permissions that could limit access.
If that’s the case then you might need to toggle a checkbox on the content pickers to allow searching outside normal permissions.

IIRC there can also be some content query stuff required for content pickers if they should open on a specific section in the content tree.

Thanks! will bring this up with my team

We typically include non-page content (including reusable content nodes) under a non-templated “Configuration” node:

  • Home
    • Configuration
      • Reusable CTAs
        • Reusable CTA
        • Reusable CTA
        • Reusable CTA
    • Subpage
    • Subpage 2

We can then exclude all content under “Configuration” from being rendered in sitemaps, etc. via code. It’s nice having all of this content in one place.

We can then reference via node picker fields the content in Home > Configuration > ReusableCTAs. For example, we can create Block Editors that reference that content, or even create ViewComponents that render them.

I too am looking forward to the upcoming Global Blocks feature.

We don’t use this configuration for a reason. I assume that home has the ‘cultures and hostnames’ set? In that case, each configuration item would get a routable url (although no template to render) and you need logic to remove it from the sitemap. In my example, all shared content and configuration is outside of the website root, which makes it much easier not to include it in the sitemap by simply starting the sitemap at home. And since home and it’s children are only actual pages, no need for custom logic.

Yes, that isn’t a bad idea. In our setup, we create new sites from the same starter code, which already removes configuration content from being rendered in sitemaps before we build the new site, so it isn’t an issue for us.

This actually makes me wonder if a possible future Umbraco improvement would be to add an option to remove a node and descendants from routing.

Edit: I re-read your setup, that is pretty cool.