{"_id":"54651c6df42a472000b0c611","githubsync":"","version":{"_id":"542979c51215fe08007e0ee8","project":"542979c51215fe08007e0ee5","__v":4,"createdAt":"2014-09-29T15:24:53.437Z","releaseDate":"2014-09-29T15:24:53.437Z","categories":["542979c51215fe08007e0ee9","542985897a6b690800767fab","5429898d1215fe08007e0fe6","542ac5aa54d88d140075fcaf"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"is_link":false,"project":"542979c51215fe08007e0ee5","__v":3,"parentDoc":null,"user":"542979b61215fe08007e0ee4","category":{"_id":"5429898d1215fe08007e0fe6","pages":["5429ad872e366c080086b5c6","5429cb1b2e366c080086b777","542db0adcb19820800c1f4a3","54380c2df15a8e1400831f88","542aee7d54d88d140075ff00","542af02f54d88d140075ff14","542f14abacabcf080095953b","54651c6df42a472000b0c611","55f81b4f59eace0d0087db2b","56b0c5d81486990d009c101a","56babbffc275570d00ce7105"],"project":"542979c51215fe08007e0ee5","version":"542979c51215fe08007e0ee8","__v":10,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-09-29T16:32:13.661Z","from_sync":false,"order":1,"slug":"helpers","title":"Helpers"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2014-11-13T21:02:37.302Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"basic_auth":false,"results":{"codes":[]},"try":true,"auth":"never","params":[],"url":""},"isReference":false,"order":5,"body":"Inkcite's `{include}` Helper, as its name might suggest, allows you to easily include an external file in your email's source.\n\n## Usage\n\nIn this example, a standard opt-out message has been saved to `unsubscribe.html` and contains this markup:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"This email was sent to [RECIPIENT EMAIL].  To unsubscribe, {a id=\\\"optout\\\" href=\\\"http://www.company.com/unsubscribe/\\\"}click here{/a}.\",\n      \"language\": \"html\",\n      \"name\": \"unsubscribe.html\"\n    }\n  ]\n}\n[/block]\nThis can be included in `source.html` like this:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin venenatis sit amet mi non luctus. Cras nec lacus blandit, placerat ligula in, euismod diam.\\n\\n{include file=\\\"unsubscribe.html\\\"}\",\n      \"language\": \"html\",\n      \"name\": \"source.html\"\n    }\n  ]\n}\n[/block]\nYou can use relative or absolute paths when referencing files that are located outside of your current project directory - e.g. `/projects/all-emails/unsubscribe.html`.","excerpt":"Break giant source into smaller, more manageable chunks","slug":"include","type":"basic","title":"Include"}

Include

Break giant source into smaller, more manageable chunks

Inkcite's `{include}` Helper, as its name might suggest, allows you to easily include an external file in your email's source. ## Usage In this example, a standard opt-out message has been saved to `unsubscribe.html` and contains this markup: [block:code] { "codes": [ { "code": "This email was sent to [RECIPIENT EMAIL]. To unsubscribe, {a id=\"optout\" href=\"http://www.company.com/unsubscribe/\"}click here{/a}.", "language": "html", "name": "unsubscribe.html" } ] } [/block] This can be included in `source.html` like this: [block:code] { "codes": [ { "code": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin venenatis sit amet mi non luctus. Cras nec lacus blandit, placerat ligula in, euismod diam.\n\n{include file=\"unsubscribe.html\"}", "language": "html", "name": "source.html" } ] } [/block] You can use relative or absolute paths when referencing files that are located outside of your current project directory - e.g. `/projects/all-emails/unsubscribe.html`.