Specifying the Order of Automerged HTML5 Outputs

When you automerge HTML5 outputs, the secondary outputs are merged to the parent project's table of contents (TOC) and/or browse sequence in alphabetical order. However, you can override this default configuration and merge the secondary outputs in any order that you like. See Runtime Merging Server-Based HTML5 Output.

Example You have a parent project with a target named "Main" and three smaller projects with targets named "First Child," "Second Child," and "Third Child," respectively. If you place the three smaller project outputs in the AutoMerge subfolder where "Main" is published, their TOCs will be appended to the parent project's TOC in the following order:

  1. First Child
  2. Second Child
  3. Third Child

But what if you want "Third Child" to be appended first? You can use the steps in this topic to position it above the other targets. Therefore, the result would be:

  1. Third Child
  2. First Child
  3. Second Child

Now let's say that you add two more targets (called "Final Child" and "Another Child") to the AutoMerge folder. If you do not adjust your custom order, Flare will automerge these outputs in alphabetical order at the end of your custom order. Therefore, the final result would be:

  1. Third Child
  2. First Child
  3. Second Child
  4. Another Child
  5. Final Child

How to Specify the Order of Automerged Outputs

  1. Create an XML file and name it SortOrder.xml. You can do this by opening an editor such as Notepad. When you save the file, type the xml file extension at the end of the name.
  2. Enter the following code into the blank file.

    <?xml version="1.0" encoding="utf-8"?>

    <SortOrder>

    <Item>ProjectA</Item>

    <Item>ProjectB</Item>

    <Item>ProjectC</Item>

    </SortOrder>

  3. Replace "ProjectA," "ProjectB," and "ProjectC" with the names of your own child targets. You can add or remove line items as necessary.

    If you were to use the example at the top of this topic, you would enter the following.

    <?xml version="1.0" encoding="utf-8"?>

    <SortOrder>

    <Item>Third Child</Item>

    <Item>First Child</Item>

    <Item>Second Child</Item>

    </SortOrder>

  4. Save the file.
  5. Copy and paste the SortOrder.xml file into the AutoMerge directory of your published HTML5 output. This file sits beside the child output folders that you are using for the automerge.