Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>Title</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
</head>
<body>
<h1>Hello, world!</h1>
This here is base
{{ .contents }}
</body>
</html>
This here is the rest of the thing from some other template.
{
"workflows": [
{
"handle": "cake",
"enabled": true,
"meta": {
"name": "cake",
"description": "",
"visual": null
},
"keepSessions": 0,
"steps": [
{
"stepID": "4",
"kind": "function",
"ref": "templatesRender",
"arguments": [
{
"target": "lookup",
"value": "cupcake",
"type": "Handle"
},
{
"target": "documentType",
"value": "text/html",
"type": "String"
},
{
"target": "variables",
"expr": "{\"contents\": partContents}",
"type": "Vars"
}
],
"results": [
{
"target": "out",
"expr": "document"
}
],
"meta": {
"name": "",
"description": "",
"visual": {
"defaultName": true,
"id": "4",
"parent": "1",
"value": "Template render",
"xywh": [
2880,
1960,
200,
80
]
}
}
},
{
"stepID": "7",
"kind": "function",
"ref": "emailSend",
"arguments": [
{
"target": "to",
"value": "tomaz.jerman@crust.tech",
"type": "String"
},
{
"target": "html",
"expr": "out.document",
"type": "Reader"
}
],
"results": [],
"meta": {
"name": "",
"description": "",
"visual": {
"defaultName": true,
"id": "7",
"parent": "1",
"value": "Email",
"xywh": [
3160,
1960,
200,
80
]
}
}
},
{
"stepID": "9",
"kind": "expressions",
"ref": "",
"arguments": [
{
"target": "partContents",
"expr": "part.document",
"type": "String"
}
],
"results": [],
"meta": {
"name": "",
"description": "",
"visual": {
"defaultName": true,
"id": "9",
"parent": "1",
"value": "Define and mutate scope variables",
"xywh": [
2600,
1960,
200,
80
]
}
}
},
{
"stepID": "10",
"kind": "function",
"ref": "templatesRender",
"arguments": [
{
"target": "lookup",
"value": "cake",
"type": "Handle"
},
{
"target": "documentType",
"value": "text/html",
"type": "String"
}
],
"results": [
{
"target": "part",
"expr": "document"
}
],
"meta": {
"name": "",
"description": "",
"visual": {
"defaultName": true,
"id": "10",
"parent": "1",
"value": "Template render",
"xywh": [
2320,
1960,
200,
80
]
}
}
}
],
"paths": [
{
"parentID": "4",
"childID": "7",
"meta": {
"name": "",
"description": "",
"visual": {
"id": "8",
"parent": "1",
"points": [],
"style": "exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;",
"value": null
}
}
},
{
"parentID": "10",
"childID": "9",
"meta": {
"name": "",
"description": "",
"visual": {
"id": "12",
"parent": "1",
"points": [],
"style": "exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;",
"value": null
}
}
},
{
"parentID": "9",
"childID": "4",
"meta": {
"name": "",
"description": "",
"visual": {
"id": "13",
"parent": "1",
"points": [],
"style": "exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;",
"value": null
}
}
}
],
"triggers": [
{
"resourceType": "system",
"eventType": "onManual",
"constraints": [
{
"name": "",
"op": "=",
"values": [
""
]
}
],
"enabled": true,
"stepID": "10",
"meta": {
"description": "",
"visual": {
"defaultName": true,
"edges": [
{
"childID": "10",
"meta": {
"description": "",
"label": "",
"visual": {
"id": "11",
"parent": "1",
"points": [],
"style": "exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;",
"value": null
}
},
"parentID": "3"
}
],
"id": "3",
"parent": "1",
"value": "System - onManual",
"xywh": [
2040,
1960,
200,
80
]
}
}
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment