Use Liquid
Register liquid script under raw code and preview content to use in template of element.
Register liquids via a computed
<template>
<div ref="wrapper">
<h1>My shop is {{ liquid('name') }} ({{ liquid('email') }})</h1>
</div>
</template>
<script>
import { Liquid } from '@/components/RightSide/Builder/Helpers/Core.js';
export default {
name: 'ElementName',
mixins: [ Liquid ],
props: {
'data': {
type: Object,
default () {
return {};
}
}
},
computed: {
liquids() {
return {
name: {
code: ' {{ shop.name }}',
preview: 'Beae'
},
email: {
code: ' {{ shop.email }}',
preview: '[email protected]'
}
}
},
requestSection () {
return {
section_type: 'product'
};
}
}
}
</script>Last updated
Was this helpful?