Custom Blocks provide you with a flexible content feature that can be used for a variety of purposes. These blocks can be created by users with the Contributor, Editor, Moderator, or Administrator role; however, only Moderators and Administrators can publish custom blocks to your Stacks site.
How to Create a Custom Block
- From the Dashboard, click the Custom Blocks tile
- Click Add custom block
-
Title - enter a title for the block
- Note, this title can be made visible to your users/patrons when adding the block to a landing page
- Lanugage - if applicable, select the appropriate Language
-
JavaScript code - add any JS code here if you are creating a widget or other content
- Caution: only use JS code from trusted sources
- Body - add any additional content as needed, this could include text, images, videos, and more
-
Title - enter a title for the block
- Review and adjust any settings in the Publishing workflow if needed
- Click Save
Caution, poorly written JavaScript code can potentially expose your website and its users to security risks, compromise data, result in errors or broken functionality, which ultimately lead to a poor user experience.
Stacks is not responsible for troubleshooting or resolving issues that are a direct result of incorrect or poorly written JavaScript code. We strongly recommended you thoroughly review and test any JavaScript code before implementing it on your website, or seek help from trusted sources if you are not familiar with JavaScript coding.
After creating a custom block, it can be added to a landing page for your users/patrons to view the content.