Include External Content
In this tutorial, you'll learn how to include larger content chunks with a subset of the XInclude standard. You need the Professional version of Tópico to complete this tutorial.
You can reuse large content chunks using the XInclude syntax, for which a subset is supported in Tópico.
Include a table from another topic
- Add two pages to your collection. We'll call them page_a and page_b;
- On page_a, create a table and insert some content in it;
- Double click the table border to show the table's properties;
- Set the table id to "target" and click ;
- On page_b, click the button above the editor and select ;
- Select the file page_a.en.xml and the ID of the element to include (or the body element);
- Click on ;
- Publish your collection.
In your publication, page_b now contains a copy of the table found on page_a.
If you click on the XML button in the XStandard toolbar, you will see the following markup:
<include href="a.en.xml" xmlns="http://www.w3.org/2001/XInclude" xpointer="target" />
Using an external file with commonly used content referenced this way can be useful in many publishing scenarios.
Including a Site Map through the Insert buton is a special case of XInclude where all the attributes are entered by the tag defined in insert.xml.
To include the whole content of another topic, you can leave the xpointer attribute blank and the <xhtml:body> or <body> element will be inserted automatically.