Creating Custom Components with Parsley
Using Zesty's drag and drop option (Freestyle App)
First, Install the Freestyle App to your instance from our marketplace. Refer to installation guide here.
Select your content model
A layout is created against a content model which will dictate the default structure of all items within the content model. For example, if you have a multi-page content model called Articles, then you can create a layout that will reflect the structure for all items created within that model, ie: all articles.
Drag and Drop
Open the Freestyle app from the left navigation tree. Select the content model you would like to design.
Start building out your design with our existing design elements such as a 2 columns. Then add content by dragging the field element. The Freestyle app will automatically display the content model's configured fields.
Create your own components
Create your custom components to expand on the drag and drop options of the Layouts app. Give it a name, class, an image url (used as the thumbnail in the app), and add your code. For added simplicity, you can even call Parsley in the component's code!
Using Parsley for custom components
In the Code app, create a new snippet file.
Add your code, you can even call content dynamically using Parsley. Your snippet file can now be used within your custom component by using the include
Parsley call. For example, a snippet created with the file name: /components/myComponent
can be called with the following syntax: {{ include /components/myComponent }}
That's it! You will see your custom component available to be dragged and dropped within the Layouts app. If you are using dynamic Parsley calls within its snippet file, you will see that rendered within the app.
Connect with Content Experts
Book a free 15-minute consultation with a content expert. Discuss your application, pain points and requirements. Understand how Zesty's lower total cost of ownership, features, functionality can elevate your business by creating extraordinary digital experiences.
Trusted By
G2 MOMENTUM LEADER