HTMLSnippets External File

0
Can an HTMLSnippet's External File field contain only one file, or can it include multiple files?
asked
1 answers
0

In the documentation you can find that External file has the following description:

  • External File – the path to the HTML or JavaScript file you want to add

    • The root is the theme folder
    • This will override the Contents section if used
    • With the newly added /p/ native deep links, you may want to start your file path with a / to prevent any 404s caused by this deep link

So what an External file basically does is follow a path with the root in the theme folder, get the contents and overwrite the Content field with the content of the external file. This means that it's a single file. If you want to include multiple JavaScript files you can, depending on your use case and situation, combine them into one file or include multiple HTML snippets.

If you would include multiple HTML snippets keep in mind that the UI is not rendered from top to bottom, so the order in which the files are loaded could vary. So any dependency between files might cause issues.

answered