Close
Close

Blocks

2022/07/27
 • 

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

  1. In the Content tab of the Contentful dashboard, select Block as the content type.

  2. Click the blue Add Entry button and sub-select Block as the content type.

  3. Fill in the required fields.

  4. 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

  1. Navigate to the blocks's editor in the Contentful dashboard.

  2. Click the three dots icon in the top right corner of the page.

  3. Click Duplicate.

Duplicating a block creates an unpublished copy, with a unique ID.


How to edit a block

  1. Navigate to the block's editor in the Contentful dashboard.

  2. Update the block's form fields with any changes.

  3. Review changes via the test environment. Note that changes will appear in the test environment without needing to click the Publish changes button.

  4. 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

  1. Navigate to the block's editor in the Contentful dashboard.

  2. Click the down arrow icon on the right side of the green Publish changes button.

  3. Click Unpublish.

Unpublished blocks are hidden from getmysa.com but remain visible in the test environment.


How to delete a block

  1. Navigate to the block's editor in the Contentful dashboard.

  2. 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

  1. Navigate to the block's editor in the Contentful dashboard.

  2. Select the appropriate version of the block under the Versions section of the sidebar.

  3. Click the Compare with current version button. This will open the comparison view.

  4. Select the fields you wish to restore to their previous version.

  5. Click the green Apply changes button. The updated version of the block will be auto-saved.

  6. 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.

by LastSale
Close
by LastSale
Close