Insert Content Before or After a QCDR Match

Insert before it and Insert after it add new content next to a match while preserving the original matched output. They are useful for labels, notices, markup, links, or other additions that should appear immediately adjacent to an existing rendered value.

Choose the Direction of the Insert

  • Insert before it: QCDR outputs the replacement first, followed by the original matched content.
  • Insert after it: QCDR outputs the original matched content first, followed by the replacement.

The original match is preserved in both cases. If the goal is to remove or completely change the original value, use Remove or Replace instead.

Build the Rule

  1. Create or edit a Rule and keep it Draft while testing.
  2. Choose the rendered content type and enter Find this.
  3. Select Insert before it or Insert after it.
  4. Choose Enter a value or Use a QCDR token as the Replacement source.
  5. For direct content, choose a suitable Replacement type such as Plain text or HTML or formatted content.
  6. Limit the Rule to the intended frontend pages and configure matching behavior.

Watch Repeated Matches

Insertion happens for each match selected by the Rule's occurrence settings. If the find value appears ten times and All occurrences is selected, the inserted content can also appear ten times. Use First, Last, A specific occurrence, or Maximum replacements per page when only a limited number of inserts are intended.

Ordering Can Change the Result

Rules run sequentially in library order. An earlier insertion can create new rendered text/markup that a later Rule may match, and an earlier replacement can remove the target an insert Rule expected. When Rules interact, test them in the same order used in the library.

Avoid Repeated or Broken Markup

When inserting HTML, choose a complete and valid fragment and target a stable boundary. Do not insert half of an opening/closing tag pair around content unless the corresponding structure is intentionally provided by a Wrap Rule. Verify the actual rendered page after enabling the Rule.


Community Discussion

Want to compare workflows, share practical tips, or discuss how you use this QCDR feature? Visit the QC Dynamic Replacer Community. For private support, bug reports, account-specific issues, or feature requests, use the QuantaCade support system.