Include External Content

THESE PAGES ARE STILL UNDER CONSTRUCTION AND DO NOT NECESSARELY REFLECT THE CURRENT VERSION OF TÓPICO

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

  1. Add two pages to your collection. We'll call them page_a and page_b;
  2. On page_a, create a table and insert some content in it;
  3. Double click the table border to show the table's properties;
    table id
  4. Set the table id to "target" and click Ok;
  5. On page_b, click the Insert button above the editor and select Include Dialog ...;
  6. Select the file page_a.en.xml and the ID of the element to include (or the body element);
  7. Click on OK;
  8. 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 xml button in the XStandard toolbar, you will see the following markup:

XML
<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.

Tip

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.

THESE PAGES ARE STILL UNDER CONSTRUCTION AND DO NOT NECESSARELY REFLECT THE CURRENT VERSION OF TÓPICO

64 / 194