Cross Linking in Imported Content

On this Page

Overview

Aside form using the Carbon Editor UI at editor.liquid-state.com to create fields, sections, and pages with Linking IDs, it is also possible to configure cross linking in imported content.

There are a number of considerations for how this works, as detailed below. In general, it is important to consider the configuration of your content prior to creating the XML to be imported.



Configure Linking IDs in Carbon Editor XML

To import new content which will support being linked elsewhere:

  1. Create your content in Carbon Editor XML Format.
  2. On each relevant page, section or field element in your XML, add a custom Linking ID attribute. For example:

    embedding_id="my-embedding-id"

    It is important to use unique Linking IDs when creating new content.
    If you reuse an existing Linking ID that already exists elsewhere within your Space, the new content you import will replace the existing content.

  3. Save your XML content and compress it in to a .zip file.
  4. Continue to import this .zip as per Exporting content for InDesign or Importing Content with the API.
  5. If importing content as a new document, ensure you have set a custom Linking ID against the document itself.

Examples of XML elements with Linking IDs

The following code blocks are examples of XML including custom Linking IDs:

Page
<page title="Example page" embedding_id="example-page-embedding-id">
...
</page>
Section
<section name="Introduction" type="introduction" embedding_id="example-introduction-section-embedding-id">
...
</page>
Field
<text field_type="paragraph" embedding_id="example-paragraph-field-embedding-id">
	<value format="html"><![CDATA[...]></value>
</text>



Link an existing page within imported content

You wil need:

  • A pre-existing document containing the page you want to link.
  • Pre-configured Linking IDs for the page itself, and the document it is contained within.

To link an existing page within XML that you are going to import:

  1. Create your content in Carbon Editor XML Format.
  2. Within the content you are creating, add an embedded section as per the example below (making sure to replace the example Linked IDs below with your real Linking IDs):

    <section name="Embedded Section" type="embedded-section">
        <embed field_type="embedded-section-data" embed_type="page">
            <document format="embedding-id">Example-Document-Embedding-Id</document>
            <page format="embedding-id">Example-Page-Embedding-Id</page>
        </embed>
    </section>

    The type and field_type of the section and embed tags are very important and cannot be changed, unlike when importing other types of content.

  3. Save your XML content and compress it in to a .zip file.
  4. Continue to import this .zip as per Exporting content for InDesign or Importing Content with the API.


Link an existing section within imported content

You wil need:

  • A pre-existing document, with a page containing the section you want to link.
  • Pre-configured Linking IDs for the section itself, as well as the page and document it is contained within.

To link an existing section within XML that you are going to import:

  1. Create your content in Carbon Editor XML Format.
  2. Within the content you are creating, add an embedded section as per the example below (making sure to replace the example Linked IDs below with your real Linking IDs):

    <section name="Embedded Section" type="embedded-section">
        <embed field_type="embedded-section-data" embed_type="section">
            <document format="embedding-id">Example-Document-Embedding-Id</document>
            <page format="embedding-id">Example-Page-Embedding-Id</page>
            <section format="embedding-id">Example-Section-Embedding-Id</section>
        </embed>
    </section>

    The type and field_type of the section and embed tags are very important and cannot be changed, unlike when importing other types of content.

  3. Save your XML content and compress it in to a .zip file.
  4. Continue to import this .zip as per Exporting content for InDesign or Importing Content with the API.


Link an existing field within imported content

You wil need:

  • A pre-existing document, with a page containing the field you want to link.
  • Pre-configured Linking IDs for the field itself, as well as the page and document it is contained within.

To embed an existing field within XML that you are going to import:

  1. Create your content in Carbon Editor XML Format.
  2. Within the content you are creating, add an embedded section as per the example below (making sure to replace the example Linking IDs below with your real Linking IDs):

    <section name="Main Body" type="main-body">
        <embed field_type="embedded-field" embed_type="field">
            <document format="embedding-id">Example-Document-Embedding-Id</document>
            <page format="embedding-id">Example-Page-Embedding-Id</page>
            <field format="embedding-id">Example-Field-Embedding-Id</field>
        </embed>
    </section>

    The type and field_type of the section and embed tags are very important and cannot be changed, unlike when importing other types of content.

  3. Save your XML content and compress it in to a .zip file.
  4. Continue to import this .zip as per Exporting content for InDesign or Importing Content with the API.


Unless otherwise indicated in the Overview page of this WIKI the information contained within this space is Classified according to the /wiki/spaces/ISMS/pages/739344530 as

INTERNAL