Referencing page content
This is a completely under used functionality of Typo3... It allows you to reuse existing content elements on multiple pages. Say for example you have a paragraph of text that you want to use on several different pages. One way of achieving this would be to copy and paste the paragraph into each page. However, what would happen if you later wanted to change the contents of the paragraph? You would end up having to update each copied paragraph manually; referencing content allows you to avoid this situation.
Referencing allows you to create a virtual link between a content element (the original content element) and one or more pages of the site tree (where they become referenced content elements).
In the BackOffice, you will be able to see which content elements are references by looking at the top of the content box.
Creating a new content reference
You can create a new content element reference by following these steps:
- In the modules menu click the 'Page' module link located in the 'Content' section.
- In the site tree click the title of the page containing the content element you wish to reference (the original content element).
- The page content editing interface should now be displayed in the content editing window.
- In the toolbar located above each content element you will see a number of icons. You can reference a content element by clicking the ‘Create reference’ icon in its toolbar.
- In the site tree, click the title of the page you wish to insert the referenced content into.
- In the content editing window you will now be able to paste the referenced content by clicking one of the ‘Paste’ icons.
Editing a content reference
You have two choices when editing an existing referenced content element:
- Modify the original content element that will in turn modify the referenced content element.
- Transform the referenced content element into a standard content element by creating a local copy.
You can modify the original content element by following these steps:
- In the modules menu click the 'Page' module link located in the 'Content' section.
- In the site tree click the title of the page containing the referenced content element you wish to edit.
- You should now see the page-editing interface appear in the content editing window.
- To edit a referenced content element click the icon located on the left-hand side of its toolbar in order to open its context menu.
- From the context menu click the ‘Edit’ link.
- The content editing form should now appear in the content editing window. This form allows you to update the original content element which will in turn update the referenced content element.
- Once you have finished editing the content editing form click the ‘Save’ or ‘Save and close’ button in the toolbar.
In some cases, you might want to update the referenced content element without altering the original one. This can be achieved by creating a local copy of the original content element. Once you have created a local copy it cannot be converted back into a referenced content element. You can create a local copy of a referenced content element by following these steps:
- In the modules menu click the 'Page' module link located in the 'Content' section.
- In the site, tree click the title of the page containing the referenced content element you wish to convert into a local copy.
- The page content editing interface should now be displayed in the content editing window.
- You can convert a referenced content element into a local copy by clicking the ‘Create local copy’ icon located on the right-hand side of its toolbar.
- Click ‘OK’ when prompted to confirm your decision.
- You can then edit this content element without changing any of the referenced content elements.