How to reuse schematic detail from other files.

If you want even more detail, read the MorfLess description and instructions at GitHub.



Inserts are where you add schematic commands from other files. Much like using remote data in PoliMorf, with inserts you can create common elements and reuse them easily. Inserts can be used to add data to the head tag of the html as well.

Inserts can be elements that can be seen by a user, or references, styles and script added to the html head tag or just before the closing body tag.

Inserts

An insert has a single keyword "ref". The reference should be the name of the file in the source bucket. If you decide to use a folder with inserts use the syntax "folder/file" to reference it. AWS doesn't use leading frontslashes for folders.

///META:
title={ Title 1 }:
url={ /path/to/page }:


///HEADER:
< more commands ...>

///MAIN:
%%INSERT::
ref={ file-to-insert.txt }:

///FOOTER:
< more commands ...>


Insert files

An insert should only have schematic commands in it. Do not put section tags (e.g. ///HEADER:)

%%POSTLIST::
list={
page1.page, page2.page, page3.page,
page4.page, page5.page, page6.page
}:

posts_per_page={ 3 }:


Header and footer additions

An insert in the header or footer can also add additions commands, which are used to add data to the head and at the end of the footer, just before the close body tag. The example below is for the header.

%%CONTENT::
TEXT=[
<text or html here for the header section>
]:

%%HEADER_ADDITIONS::
content={
<script src="path/to/script"></script>
<!-- extra style -->
<style>
.something {
...
}
</style>
}:


Raw html

You can also use the RAW command in inserts so that specific pieces of html can be used. This command bypasses the insertion of inner and outer div wrappers that are used in the default MorfLess layout design.

%%RAW::
TEXT=[
<text or html here >
]:

Pages and Posts

Layouts

Inserts

Settings

Understood
This website is using cookies. More details