Blocks are self contained web components that can include HTML markup and tags, CSS, JavaScript, and copy.
Multiple blocks can be included on a Page. The same block can be used on multiple Pages.
Fields
Markup: this field contains HTML markup for the block, including copy [[placeholders]] (enclosed in double square brackets).
Styles: this field contains CSS styles for the block that will appear in the HTML <head> tag of the page. Styles should start with the block's unique ID. The contents of this field will automatically be enclosed in a <style> tag.
Head Scripts: this field contains JavaScript for the block that will appear in the HTML <head> tag of the page. The contents of this field will automatically be enclosed in a <script> tag.
Tail Scripts: this field contains JavaScript for the block that will appear at the end of the HTML <body> tag of the page. The contents of this field will automatically be enclosed in a <script> tag.
Copy: this field contains the copy that will appear in the [[placeholders]] included in the Markup field. This field is in JSON format, and includes the default copy for all locales. Block-level copy that appears in this field can be overwritten by page-level copy that appears in the Page's copy field.
Head Tags: this field contains any <script> or <style> tags that are required for this block. The contents of this field are inserted in the HTML <head> tag of the page.
How to create and publish a block
In the Content tab of the Contentful dashboard, select Block as the content type.
Click the blue Add Entry button and sub-select Block as the content type.
Fill in the required fields.
Click the green Publish button.
Published blocks can be referenced by pages on getmysa.com.
Both published and unpublished blocks can be referenced on pages in the test environment.
How to duplicate a block
Navigate to the blocks's editor in the Contentful dashboard.
Click the three dots icon in the top right corner of the page.
Click Duplicate.
Duplicating a block creates an unpublished copy, with a unique ID.
How to edit a block
Navigate to the block's editor in the Contentful dashboard.
Update the block's form fields with any changes.
Review changes via the test environment. Note that changes will appear in the test environment without needing to click the Publish changes button.
When ready to publish the changes, click the Publish changes button.
Note that changes made to the form fields are auto-saved after a few seconds.
The current status of the saved changes is displayed below the green Publish changes button.
How to unpublish a block
Navigate to the block's editor in the Contentful dashboard.
Click the down arrow icon on the right side of the green Publish changes button.
Click Unpublish.
Unpublished blocks are hidden from getmysa.com but remain visible in the test environment.
How to delete a block
Navigate to the block's editor in the Contentful dashboard.
Click the three dots icon and select Delete.
Deleted blocks are permanently removed from getmysa.com and the test environment.
How to roll back to a previous version
Navigate to the block's editor in the Contentful dashboard.
Select the appropriate version of the block under the Versions section of the sidebar.
Click the Compare with current version button. This will open the comparison view.
Select the fields you wish to restore to their previous version.
Click the green Apply changes button. The updated version of the block will be auto-saved.
When ready to publish the restored version of the block, click the Publish changes button.
Every time an entry is published, a backup version is added to the list under the Versions section of the sidebar.
Only the past 7 published entry versions are available.
Any previous versions of the entry are irretrievably lost.