Inheriting documents
Document inheritance is a feature that lets you create a pre-filled document where you can override just the section you need. Think of this feature as a "template in a template." This feature is activated by setting the Content Master Document property in the document settings. This feature applies to every document type, and it is very useful for repetitive content, such as newsletters or technical documentation.
In the following steps, we will see how to take advantage of inheritance for reusing content and organizing website content better. We will create a simple product catalog with a product (here, t-shirts) with multiple variants (one variant per color), and each variant will have its web page.
Follow these steps to do this:
- First of all, we have to create a template for a product page. So, let's create a file called
product.html.twig
inside/templates/Default
. The process is very similar to the one followed in the Editing a...