Discovering and Creating Template Parts
In previous chapters, we looked at blocks and then moved on to patterns. We also learned about the Site Editor. In this chapter, we are going to discover a new feature mentioned before: template parts.
Template parts are a collection of blocks made into a part that can be shared. You might be wondering what the difference is between this and a pattern. A template part is specifically used for structuring your site – for example, a header or a footer. There is even a specific section to browse and manage them within the Site Editor.
In this chapter, we will cover the following together:
- Creating a template part
- Using a template part
- Deleting a template part
- Detaching a template part
- Managing a template part
So, let’s jump right in and discover the first part of this by creating a template part.