Skip to content

Hype Template Placeholder

Max Ziebell edited this page Sep 18, 2020 · 4 revisions

Variables

Variable Content
${bgcolor} The background color you set in the scene panel
${customHeadHtml} The content you add to your Head HTML (without head tag)
${mainContainerDivWidth} The (initial) width of your Hype document. It uses the smallest layout it can find (mobile first). If you want another behavior you can change it using a terminal command.
${mainContainerDivWidthUnit} The unit for width (for now only px or %)
${mainContainerDivHeight} The (initial) height of your Hype document. It uses the smallest layout it can find (mobile first). If you want another behavior you can change it using a terminal command.
${mainContainerDivHeightUnit} The unit for height (for now only px or %)
${posterImageFileName} The path to the poster image. Size is chosen by best match.

Generated Variables

Variable Content
${mainContainerID} The ID Hype creates from your filename (sanitized)
${javascriptFileName} The path to the generated document *_hype_generated_script.js

Constants

Variable Content
${physicsJSFileName} The full path to the physics engine file (based on Matter.js)
${hypeJSFileName} The full path to the Hype runtime (Thin or Full)
${waypointsJSFileName} The full path to the the view port action helper (base on waypoints)

General Conditionals

Condition Content
${ifdef VARIABLE}${endif} Check if VARIABLE is defined is set. Could be any of the variables above to see if they are defined.
${ifndef VARIABLE}${endif} Check if VARIABLE is defined is not set. Could be any of the variables above to see if they are defined.

Conditionals

Condition Content
${ifdef bgcolor}${endif} Check if a background color is defined
${ifdef includeHypePhysics}${endif} Check if physics is used
${ifdef inlineHypeJS}${endif} Check if the runtime should be linked
${ifdef includeHypeWaypoints}${endif} Check if waypoints is used
${ifdef posterImageFileName}${endif} Check if a poster image is defined
${ifdef inlineDocumentLoader}${endif} Check if advanced exports inlines the generated scripts
${ifdef divForSEO}${endif} Check if exports is set to include SEO content
${ifdef legalDisclaimer}${endif} Check if a legal disclaimer is defined

Unknown or outdated

Variable Content
${legalDisclaimer} Not sure what this is used for
${ifdef dashboardWidget}${endif} Check if this is exported as dashboard widget (probably outdated at this point, backwards compatibility)

Editing templates and helper

These placeholders can be found in the Hype template called IndexTemplate.html in the Hype 4 Resource folder in the application package. If you edit them, please make a copy beforehand. Editing them breaks the code signature and is not supported by Tumult but it works.

You can also give the little application Hype Template Genie a try to streamline setting the template. To follow the discussion around this application and approach visit the forum thread.

Clone this wiki locally