Skip to content
jrondorf edited this page Nov 13, 2018 · 3 revisions

More Special Purpose HTML Templates

There are often special cases where content needs to be added to the page in very specific places. S3 supports 4 additional areas of the page where you can add page-scoped HTML. Page scoped HTML is added only once to the page no matter how many copies of the stack are added to a page and only templates that are not specific to the stack instance (like paths and version numbers) can be replaced.

Note: All of the stacks that include page scoped templates will be added to their specified locations. The order that they are added is indeterminate and may change from one publish to the next. You should not rely on the order.

Page Scoped HTML, In the Head tag, Above Javascript

Plist template dict scope: pageHeadAbove

The content of this template will be placed immediately AFTER the call to jQuery, jQueryUI, and FontAwesome within the head tag of the page. It will be BEFORE the call to the stack javascript. The obvious use case for this template is to link external JS libraries.

Note: There are no protections on loading JS libraries this way, if other stacks load the same libraries conflicts could occur.

Page Scoped HTML, In the Head tag, Below Javascript

Plist template dict scope: pageHeadBelow

The content of this template will be placed immediately AFTER the call to the stack javascript. This is an alias for the current "page" scope template from Stacks 2.5. You can continue to use the older scope name if you prefer, both are acceptable and provide the same behavior.

Page Scoped HTML, In the Body tag, Before Content

Plist template dict scope: pageBodyAbove

The content of this template will be placed immediately BEFORE all other stack content. This is a place to add content that may need to be added only once to the body tag.

Note: It would be preferred to place this content just after the tag. This is a known limitation that is currently unsolvable due to RW API limitations. If those limits are lifted this behavior will be improved.

Page Scoped HTML, In the Body tag, After Content

Plist template dict scope: pageBodyBelow

The content of this template will be placed immediately AFTER all other stack content. This is a place to add content that may need to be added only once to the body tag. Some Javascript works best that way.

Note: It would be preferred to place this content just before the tag. This is a known limitation that is currently unsolvable due to RW API limitations. If those limits are lifted this behavior will be improved.

Page Scoped HTML, before HTML starting tag

Plist template dict scope: pagePrefix

The content of this template will be placed immediately BEFORE all other HTML content.

Clone this wiki locally