Skip to content

Latest commit

 

History

History
46 lines (25 loc) · 1.02 KB

File metadata and controls

46 lines (25 loc) · 1.02 KB

<mixin>

Node > Internal > Construct > Splice > Mixin

This is the default implementation of the mixin parser.

Similar to mixin functions found in CSS pre-processors like SASS, this element will interpolate the inner markup of another element that it is linked to into its parent's body where the <mixin> tag is located.

The 'link' attribute must be set with the ID of the element to mix-in, or alternatively a valueless attribute with the '&' modifier.

Note only the inner tags of a linked element will be imported. This means text embedded directly into the linked element will not be included.

Attributes

parser : 'mixin'

Examples

Basic Usage:

<template id='terms-template' >

    <tag>Tag A</tag>
    <tag>Tag B</tag>

    <category>Example</category>

</template>

<post>

    <title>Post A</title>

    <mixin link='terms-template' />

</post>

<post>

    <title>Post B</title>

    <mixin &terms-template />

</post>