Skip to content

Instantly share code, notes, and snippets.

@makeusabrew
Created April 11, 2012 13:53
Show Gist options
  • Save makeusabrew/2359434 to your computer and use it in GitHub Desktop.
Save makeusabrew/2359434 to your computer and use it in GitHub Desktop.
JSON schema & template suggestion
/app/emails/templates/
- /standard-image-paragraph
- meta.json
- template.tpl
- thumbnail.png
- /header-2012-a
- meta.json
- template.tpl
- thumbnail.png
- /etc
-
-
-
{
"title": "Standard Paragraph (w/ thumbnail)", // optional..
"thumbnail": "thumbnail.png", // thumbnail.png would be default, so this too is optional...
"fields": {
"image": {
"type": "image",
"default": "/some/image.jpg",
"required": false
},
"para_1": {
"type": "textarea",
"required": true,
"title": "Main Paragraph"
}
}
<div class=foo>
<img src="{$data->image}" class="float left" />
<p>{$data->para_1}</p>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment