-
Notifications
You must be signed in to change notification settings - Fork 4
II.6.b. Homepage, F.A.Q. page, header, footer
ololord.js uses doT.js as a template rendering engine. Custom page conten is also rendered using this engine.
Create public/templates/custom-home.jst
. It will be rendered as any other doT.js templates. See public/templates/custom-home.jst.example
for an example.
Note: all templates must have only one root element. Just wrap everything in a div
or a span
.
Create public/templates/custom-faq.jst
. It will be rendered as any other doT.js templates. See public/templates/custom-faq.jst.example
for an example.
Create public/templates/custom-header.jst
and/or public/templates/custom-footer.jst
. These templates will be rendered as any other doT.js templates. See public/templates/custom-header.jst.example
and public/templates/custom-footer.jst.example
for examples.
The content of custom header is wrapped in a header
tag, and the content of custom footer is wrapped in a footer
tag.
Note: Regardless of whether on not custom footer and header are provided, the corresponding tags will be present on the pages. The following styles are applied to them:
header {
padding-top: 2px;
padding-bottom: 8px;
}
footer {
padding-top: 8px;
padding-bottom: 2px;
}
So, to prevent empty tags occupy the space on your site pages, you may create dummy header/footer templates with the following content:
<div style="display: none;">
<script type="text/javascript">
$("header").hide(0); //jQuery is used
</script>
</div>
or, for the footer:
<div style="display: none;">
<script type="text/javascript">
$("footer").hide(0); //jQuery is used
</script>
</div>