What is Global Manifesto ?

Building codes for your nodes

Its a way of structuring content nodes in Umbraco. Separating those local nodes that should only represent webpages from the global data that should be reusable, reroutable and easy to repurpose.

This is aimed at those that

  • Model Umbraco Content
  • Websites with more than 100 page-ish
  • Who like Best Practices

Once implemented this allows space for your Umbraco website to grow, whether its repurposing content in multiple locations across the same or multiple websites, use best case data paradigms such as trees or buckets to store & retrieve content, and ultimately Umbracofies all the Urls so that you never again have hardcoded web addresses in your Umbraco code.

What is Local?

Just the webpages that make up a website

Utilizing the tree stucture of Umbraco content, you create a one to one relationship between webpages that are created by Content Editors and webpages that are served up to End Users. Maintaining this link is vital for keeping your content simple. Its simple to explain to content editors, its easy to understand when a node becomes a webpage because all local nodes are webpages. At no point do local nodes have a different or secondary purpose.

  • If its a local node then its a webpage
  • Delete a local node, deletes a webpage
  • Create a node within a parent node, adds a webpage with a new slug appended to the url of the parent webpage

Local is the webpages of a website.

What is Global?

Its an Umbraco content managed source of data for local page to display information

Data for webpages can and will come from many sources, External api and external databases are two very common sources but also some will need to be content managed. 

Having that source within the same Umbraco instance makes perfect sense. The issue is how to demarcate local data from global data.

Following Global Manifesto rules and keep the global data outside and away from local data.

  • Content Managed source of data
  • Can have site or global scope
  • Create once, but reused multiple times for mutiple webpages

Content Managed data that is used as a source of information for one or many webpages

Multisite

Multiple websites in one Umbraco Instance

You always create a website as if there are going to be others. It means the first level of content nodes in root are the different websites hosted (Except if you are Scaffolding)

  • Allows Content Managers to create and administer staging and live environments for their webpages
  • Allows Reuse of code for sister sites

Umbraco, out-of-the-box, allows creation of different domains for different websites.

Scaffolding

Create hierachy to multisites

Sometimes you can group the multiple sites into some sort of structure or hierachy, this allows the global data to also follow this structure and expands your global data into scoped data

  • Group websites by countries
  • Group websites by themes or business units
  • Control content editors access to one or more websites

With scoped data you can blend multiple hierachical data souces into one, allowing different groups to be created and edited by different content editors whether in different business units or maybe different regions and countries.

Home Page

Starting page for website

The home page should be a webpage like any other webpage, what it should contain is only information about how it should render itself.

What it shouldn't contain is information about the website in general. That should live on the website node.

The one thing that makes this home page different to all other local data is that its here that you set the domain for the website.

  • Home page lives within the website node
  • Is where the domain is set

If your using super templates or grid controls then the home page can be like any other standard page.

Content Pickers

Always use Content Pickers or Multinode Treepickers to connect up the various links between local webpages or sources for global data  

An often well used trope for an Umbraco website is what is the home page, what page is the login page. What is the product page.

Often links between pages can be completely flexible, maybe the header and footer menus are completely content managed, but every so often the website layout requires that the whole site needs to know what the login page is for example. By setting these types of local pages using a Content Picker or Multinode Treepicker on the website node allows for greater flexiblity.

As for global data, using a Multinode Treepicker to select multiple valid sources allows the blending of various data, maybe from various scopes, regions or types or from any facet that maybe relevant ijn the future. 

  • Preference for allowing content editors to pick data not code

Let the CMS do the work

Content Finders

Display global data in local web pages

Content Finders are an extremely powerful Umbraco feature that allows the serving of global data from a base page. Its only takes a few lines of code to connect these up.

For example, News Pages. 

First you would create a Document Type that will be used as a local webpage for listing all news articles, maybe it display 10 news articles at a time in paged fashion, thats up to you. One of the properties on that Document Type is a News Article Global Data MultiNode TreePicker, this allows the content editor to select from which pool of News Articles they wish to display. For this example the Content Editor uses the Document Type and creates a page called 'News', which means the Url of that page is /news/. But in reality the Content Editor is free to call it whatever they like.

Next add code that Creates a ContentFinder, this code will run whenever a front end user requests an Url that doesn't currently match an existing Webpage. The idea is this ContentFinder will match Url requests that are valid and ignore any requests that aren't. In this example, if the end user tries to surf to '/news/latest-chocolate-news' 
and one of the Global Data items that was picked by the Content Editor is named 'Latest Chocolate News', then we wish to show content from that Global Data Item using our Document Type.

Our job is to write code that takes '/news/latest-chocolate-news' and then tells Umbraco to send that request as if they had typed '/news/'

ContentFinders have Urls as their Input value and for Output allow you to say which existing Local Webpage Node you wish to handle that request. Then Umbraco will fire off the relevant Document Type Controller or Razor code applicable for that Document Type you select as Output.

  • Create Content Finders to serve global data

Powering your content via Content Finders

Anti-Patterns

What NOT to do

A few Umbraco content patterns are prevelant thoughtout the community and you will see them in many Umbraco instances out there in the wild. Some are even taught in official lessons or documentation.

Global Manifesto says NO

  • Do NOT create webpage subnodes if they are not webpages themselves. Use either global data or complex data types like Grid control, Nested Content within the webpage itself instead etc.
  • Do NOT create arbitrarily links between pages using ancestors, siblings or descendants searches. Instead use content pickers or MNTP to set links
  • Do NOT use hard coded ids or magic names to make links between pages. Use Content Pickers instead.
  • Do NOT hardcode Urls that deliver webpages. This is prevelance in those that have external data but don't implement in an Umbraco way. Use ContentFinders instead.

Good content nodes structure creates flexible Umbraco instances, which makes happy content managers.

Backend Videos