Overview
Following this steps in this guide, you will create, configure and test an advanced component to use your drag and drop template.
If you have not already created a drag and drop template, please check this guide for instructions.
Create an Advanced Component
- Use the File View Panel to navigate to the /Component Project/Component Library/Component Definitions folder in your site. You should see a few folders there already.
![kA01W000000PZegSAG_en_US_1_0.png kA01W000000PZegSAG_en_US_1_0.png](https://community.crownpeak.com/t5/image/serverpage/image-id/1000i2B23EF3BD6A566B7/image-size/medium?v=v2&px=400)
- Select File > New > Model: Component Folder, enter a name and click Create.
![kA01W000000PZegSAG_en_US_1_1.png kA01W000000PZegSAG_en_US_1_1.png](https://community.crownpeak.com/t5/image/serverpage/image-id/1001i28904F6A20731416/image-size/medium?v=v2&px=400)
- In your component folder, select File > New > Model: Component. Enter a name and click Create.
- Using the action bar, go to the Form view and Insert this HTML into the Markup field
<article>
<header>
<h1>{headline : Text}</h1>
<div class="byline">by {author : Text}</div>
</header>
<p class="intro">{intro : Text}</p>
{content : Wysiwyg}
</article>
- This HTML defines editable areas in your Markup as nested editable, components using the following syntax: {component name: component type}. Component types include Text, Wysiwyg, Image among others.
- Click the Save button to build your component.
![kA01W000000PZegSAG_en_US_1_2.jpeg kA01W000000PZegSAG_en_US_1_2.jpeg](https://community.crownpeak.com/t5/image/serverpage/image-id/1002i19D20959144620B8/image-size/medium?v=v2&px=400)
Configure behavior of nested components
- Once saved, be sure you are still in Form editing mode in your new advanced component.
![kA01W000000PZegSAG_en_US_1_3.png kA01W000000PZegSAG_en_US_1_3.png](https://community.crownpeak.com/t5/image/serverpage/image-id/1003iFFF431F90F69148E/image-size/medium?v=v2&px=400)
- Expand all the panels and scroll down to the bottom view the Component Details List
- Customize the behavior of each component
- Headline - Make this a required field
- Author- Make this a required field, change the label to 'Author Name and Location'
- Intro - Leave this as is. It will use the default configuration
- Content - Make this required, include a short message about what can be included in this WYSIWYG field
- Click the Save button to modify your component.
Define default content in your Advanced Component
- Select the Preview Content tab.
- Enter content in each available field. This is the default content your users will see when they drag this component into a page.
![kA01W000000PZegSAG_en_US_1_4.png kA01W000000PZegSAG_en_US_1_4.png](https://community.crownpeak.com/t5/image/serverpage/image-id/1004i1C79A8BDA1210330/image-size/medium?v=v2&px=400)
- Click Save
- Click Preview from the Action bar to see your content in context of the new experience
![kA01W000000PZegSAG_en_US_1_5.png kA01W000000PZegSAG_en_US_1_5.png](https://community.crownpeak.com/t5/image/serverpage/image-id/1005iDC6F6A2872FBE067/image-size/medium?v=v2&px=400)
Test!
- In the File View Panel, go back to your site root and open the test file you created using your drag and drop template.
- Click the View menu and select the Editor workspace found under the Arrange Workspace submenu. This will place the Blocks Panel on the right side of the UI.
- Select Inline editing mode to see Content blocks
- Click on the Advanced tab in the Blocks Panel
- Find your new component and drag it into the page
![kA01W000000PZegSAG_en_US_1_6.jpeg kA01W000000PZegSAG_en_US_1_6.jpeg](https://community.crownpeak.com/t5/image/serverpage/image-id/1006iD857921F1A3B5413/image-size/medium?v=v2&px=400)
Troubleshooting
- If your component does not show up in the Advanced content block panel , it's in the wrong folder. Be sure it's not in the models folder or different site root