Components Inside Of Components Using Slots
A resource section can share one introduction across several pages while presenting different content beneath it. Reusing both the section and its cards lets you maintain those designs separately. With Components and Slots in Divi 5 , you can combine those two levels of reuse. Put a card Component inside a Slot belonging to a larger section Component. The section controls its shared structure, the card controls its own shared design, and each page instance supplies its content. We’ll build a pine-green resource collection with peach cards, oversized serif headings, and editorial images. Its first instance contains two resource cards. Its second contains a checklist card beside a newsletter block. All three cards remain connected to one card source. How Components Inside Slots Work A Component has a saved source and connected instances. The source defines the settings those instances share. A Slot provides a place for an instance’s own child elements within that shared ...