Custom Component & Template Areas

It would be useful if a Custom Component could add code to a selected page template area (if that is the correct term) via an API call. I am working on securing a page with Sitelok that requires adding code at the start of the page and in the header.

This would mean that a user could just drag an “initialisation” Custom Component onto the webpage (HTML?) and configure the requirements for the page using the property editor. It would avoid a user having to add code into these two areas.

In Foundry there are a number of stacks that use this concept.

I could see this being useful when creating components for things such as Hype, Keyshape and Lottie animations. Ideally you’d want only one copy of any required scripts, styles, preloads, etc added to the page even if the user has added multiple components/animations/etc to the page.

1 Like