---
title: "Combining CONTENT_CONTROLLER & ROWS_CONTROLLER"
description: "Use these ConfigTypes in a complex setup with parent-child (Nested) DataSources. A CONTENT_CONTROLLER can be the child of another CONTENT_CONTROLLER. Here we will make an example how a ROWS_CONTROLLER is the child of a CONTENT_CONTROLLER This is quite a complex…"
url: "https://pdfbutler.com/academy/pdf-butler-academy/pdf-butler-by-configtype/combining-content_controller-rows_controller/"
updated: "2026-05-08"
category: PDF BUTLER BY CONFIGTYPE
---

# Combining CONTENT_CONTROLLER & ROWS_CONTROLLER

Use these ConfigTypes in a complex setup with parent-child (Nested) DataSources.

A CONTENT_CONTROLLER can be the child of another CONTENT_CONTROLLER. Here we will make an example how a ROWS_CONTROLLER is the child of a CONTENT_CONTROLLER

This is quite a complex example but gives a very good overview of the power of combining and nesting DataSources and ConfigTypes

[Combining CONTENT CONTROLLER and ROWS CONTROLLER](https://www.youtube.com/embed/2OOBXo8CH14?si=dT0zgvMex9-B5Mib)

## **PDF Butler – CONTENT_CONTROLLER Configuration**

A `CONTENT_CONTROLLER` allows entire sections of a Word document to dynamically repeat based on records returned from a Data Source.

This configuration is especially useful for:

- Nested repeating sections
- Parent/child relationships
- Dynamic document structures
- Complex table layouts

---

### **1. Create the Repeating Sections in Word**

Before configuring PDF Butler, the repeating sections must first be created in the Word template.

---

#### **Create the Parent Content Controller**

1. Open the Word document.
2. Select the entire section you want to repeat.
3. From the **Developer** tab, create a **Repeating Section Content Control**.
    ![](https://pdfbutler.com/wp-content/uploads/2023/08/1-4-300x161.png)
4. Open **Properties**.
5. Enter a **Title** for the content control.
    ![](https://pdfbutler.com/wp-content/uploads/2023/08/2-5-300x161.png)

---

#### **Create Nested Content Controllers**

1. Inside the parent content section, select another subsection you want to repeat.
2. Create another **Repeating Section Content Control**.
    ![](https://pdfbutler.com/wp-content/uploads/2023/08/3-6-300x160.png)
3. Open **Properties**.
4. Enter a title for the nested content control.
    ![](https://pdfbutler.com/wp-content/uploads/2023/08/4-2-300x159.png)

---

#### **Create Repeating Table Sections**

1. Select the table rows or lines that should repeat dynamically.
2. Create another **Repeating Section Content Control**.
    ![](https://pdfbutler.com/wp-content/uploads/2023/08/5-5-300x159.png)
3. Open **Properties**.
4. Enter a title for the table repeating section.
    ![](https://pdfbutler.com/wp-content/uploads/2023/08/6-4-300x158.png)

---

#### **Save the Document**

1. Save the Word document after all content controls are configured.

---

### **2. Configure PDF Butler**

#### **Configure Nested Data Sources**

1. Create and configure all required [**Nested Data Sources**](https://pdfbutler.com/academy/pdf-butler-academy/pdf-butler-by-datasource/nested-datasources/) in Salesforce.

---

#### **Upload the Template**

1. Open the corresponding **Doc Config**.
2. Upload the updated Word document in the **Doc Config Documents** section.

---

### **3. Configure the CONTENT_CONTROLLER**

1. Click **Add Config Type**.
2. Configure the following values:

- **Type** = `CONTENT_CONTROLLER`
- **Data Source** = Select the appropriate Data Source
- **Merge Field** = Enter the merge field name (example: `CarDetail`)
- **Remove MergeField Action Section** = Configure if required
   ![](https://pdfbutler.com/wp-content/uploads/2023/08/7-5-286x300.png)

1. Click **Save**.

---

### **4. Configure Child Config Types**

1. Under the `CONTENT_CONTROLLER`, create **Child Single Config Types**.
2. Map all required fields from the Data Source to the corresponding merge fields in the document.
    ![](https://pdfbutler.com/wp-content/uploads/2023/08/8-4-300x235.png)

### **5. Configure Nested ROWS_CONTROLLER**

1. Under the first `CONTENT_CONTROLLER`, create a new **Child CONTENT_CONTROLLER Config Type**.
    ![](https://pdfbutler.com/wp-content/uploads/2023/08/9-4-285x300.png)
2. Under this new Content Controller, create another **Child Config Type**.
    ![](https://pdfbutler.com/wp-content/uploads/2023/08/10-4-300x85.png)
3. Set the **Type** to `ROWS_CONTROLLER`.
    ![](https://pdfbutler.com/wp-content/uploads/2023/08/11-2-300x263.png)
4. Under the `ROWS_CONTROLLER`, create a new **Single Child Config Type**.
    ![](https://pdfbutler.com/wp-content/uploads/2023/08/12-4-300x228.png)
5. Configure the required merge fields and mappings.

---

### **6. Generate and Validate the Document**

1. Save the Doc Config to Server.
2. Generate the document from Salesforce.
3. Verify that:
   - Parent sections repeat correctly
   - Nested sections populate properly
   - Table rows repeat dynamically
   - All merge fields display the expected values
      ![](https://pdfbutler.com/wp-content/uploads/2023/08/13-1-300x228.png)
