Page Attachments

Blocs lets you easily add additional .js (Javascript ) files or .css (cascading style sheet) files to the head section of any page using the page settings.

Previewing attachments

Page attachments do not run within the app when in design mode, however, they do work as expected when a project is previewed.

Attaching a File

To attach a file to a page, navigate to the page settings by left clicking the setting symbol located in the page navigation dropdown or alternatively by using the keyboard shortcut ⌥+⌘+P.

page-settings

At the bottom of the Page settings sub-window you will see a small list with the title Header File Attachments. To the right of the title there are two buttons, one marked with a symbol and one marked with a + symbol. To add an attachment left click the button marked with a + and to remove an attachment left click the button marked with a .

add-attachment-btn

Re-ordering Attachments

Page attachments can also be re-ordered in the attachment table using drag and drop. It’s important to remember that the order of these attachments will affect the loading order of the resources.

Beginners Tip

It’s also possible to add additional JS and CSS head attachments by simply dragging and dropping them from the MacOS Finder onto the Blocs design canvas.

Updated on 16th November 2020

Was this article helpful?

Related Articles