# Section generator :::callout{theme="neutral"} This widget is only available for [document templates](../templates-overview/index.md). ::: ![notepad\_section\_generator\_concept](../../../assets/fc67a7dd87e1ea9cd0c86b87c97f666113d05dcefa10d462a5b106bffdb9401f.webp) The **Section generator** allows you to dynamically generate document content for every object in an object set. This generation step happens when a Notepad document is generated from the template (see figure above for a visualization of the concept). To set up a Section generator, add it by clicking **+ Add Widget** or typing `/` in a paragraph field to open up the [widget insertion menu](../embed-widgets/index.md#from-a-document) and choosing the Section generator. Then, connect an object set template input by selecting the widget and configuring the **Generator object set** as shown in the figure below. ![notepad\_section\_generator\_template\_input](../../../assets/859a1a04b4821d0277b9227da5cc74557bf3c52e65ccf1addab61bfc593a55a8.webp) ### Connect embedded sections with generator To connect an embedded widget's input parameter with its surrounding **Section Generator**, you need to set the parameter to `Object from Generator`. This parameter will be automatically selectable for widgets inside generators that accept object template inputs. The figure below shows an example for an [object property](../widgets-object-property/index.md). ![notepad\_section\_generator\_connection](../../../assets/f044cd4acb0440226847a2c0a3de61e03cda2021f9c3982ea587debeba0604a1.webp) ## Sort objects with the Section generator To sort the objects that are returned from a generator, use the **Sorting** controls. Select an object property to sort by from the `Sort by` dropdown. The number of objects that can be sorted is **capped at 2000**. The figure below shows an example of sorting Airline objects by the `Number of Aircraft` property. ![notepad\_widgets\_generator\_sort](../../../assets/844fc14d7a5794c106509a188da8dd4fec86e33ad593816ac7c4a0c91bc4cd39.webp) ## Template configuration * **Generator object set RID:** An object set to pass to the Section generator. The Section generator content will be generated for each object in this set. The number of objects that can be passed is **capped at 30 objects**, and objects exceeding this limit will be ignored. ## Nested generators Generators can be nested in a top-level section generator. We only support nesting generators one level deep, at most. The top-level section generator object can be configured to generate over an object set template input. A nested generator can be configured to generate over an object set template input, or over first-degree linked objects of the top-level generator object. ![A Notepad section generator linked objects generator.](../../../assets/f07960bc84823c18ada1c211f5591f1865c00de73947ecc3108fcadb23f85881.webp) ## Section generator object limits By default, the generation limit for top-level section generators is set to a maximum of 30 objects. For nested section generators, the limit is set to a maximum of 100 objects. Generating sections from a large set of objects can negatively impact template generation performance and document loading performance for the generated document.