Edit online

Contributed by: Radu Coravu

Besides the techniques we've seen so far for pulling reused content in multiple places you can also push content to a certain specified place inside an existing topic.

So why push content?

Imagine you have an existing publication "Cooking Book" containing a task with a couple of steps for peeling vegetables. At some point you create the DITA Map for a larger publication called "Cooking Book for Pros" which reuses the entire original publication by referencing to the original publication DITA Map. But you somehow need to add extra steps in the original task when the larger publication gets printed.

Pushing Content to an existing sequence of steps

Sequence of steps from the original task:

     <steps>
      ...........
      <step id="peeler_handling">
        <cmd>Pass the peeler gently over the vegetable.</cmd>
      </step>
    </steps>

Key definition in DITA Map for the task which will push the content:

<keydef href="stepsPusher.dita" keys=”peeling”/>

Content key reference push done from the "stepsPusher.dita" task:

        <steps>
            <step conaction="mark" conkeyref="peeling/peeler_handling">
                <cmd/>
            </step>
            <step conaction="pushafter">
                <cmd>Read the instructions.</cmd>
            </step>
        </steps>

So the only purpose of the "stepsPusher.dita" task which is referenced with a resource-only processing role and thus does not appear at all in the output is to modify the content of the original task which gets published.

How do we push content in Oxygen? First you would need to define an ID on an element which will be the target for our push. The conref push mechanism allows us either to replace, insert an element before or after this target element. After this you can create the topic which pushes the content, create the step which will be pushed. You can right click inside this steps and choose Reuse->Push Current Element....