By Nate Ferrero. @NateFerrero
Visit EvolutionSDK on GitHub for more information. Jolt requires the LHTML Bundle to be installed as well, and all Jolt tags and files are written and parsed with LHTML.
To use a jolt template within an LHTML page, just use the jolt tag as follows, where templateFile
is the relative path (with or without the .jolt
extension) to the Jolt template:
<:jolt template="templateFile" title="Talk to World">
<placeholder1>
<h1>Why, Hello World!</h1>
<p>I am in placeholder #1<p>
</placeholder1>
<placeholder2>
<h1>I am World</h1>
<p>I am in placeholder #2<p>
</placeholder2>
</:jolt>
And in templateFile.jolt
:
<!doctype html>
<html>
<head>
<title>{title}</title>
</head>
<body>
<p>Header</p>
<placeholder2 />
<p>You say:</p>
<placeholder1 />
</body>
</html>
Therefore, when you navigated to the first LTHML page, it would be rendered as:
<!doctype html>
<html>
<head>
<title>Talk to World</title>
</head>
<body>
<p>Header</p>
<h1>I am World</h1>
<p>I am in placeholder #2<p>
<p>You say:</p>
<h1>Why, Hello World!</h1>
<p>I am in placeholder #1<p>
</body>
</html>
I hope that shows how flexible and convenient Jolt can be! If you didn't notice, all attributes on <:jolt>
become scope variables available within the LHTML stack.
More details and examples coming soon...
More details and examples coming soon...
More details and examples coming soon...
More details and examples coming soon...
More details and examples coming soon...
If you include the /@jolt/jolt.js
javascript in your root LHTML section, your entire site will instantly become browseable without reloading the page using the window.history.pushState()
API.