Use the power of Craft and Twig to create a context-focused templating system that is as flexible, powerful, and manageable as you need.
View Slide
Template Organization
Credit: https://www.flickr.com/photos/rubbermaid/5630536467
Credit: https://www.flickr.com/photos/jdtornow/5132907504
Credit: http://www.bonkersworld.net/building-software
Sample Site
PhotosEventsBlog
Home⌂
Home⌂EventsBlog Photos
EventBlog PostPhotoHome⌂EventsBlog Photos
EventBlog PostPhotoEventsBlog PhotosHome⌂index.html
EventBlog PostPhotoHome⌂index.htmlEvents PhotosBlogblog.html
Home⌂index.htmlEventBlog PostPhotoPhotosBlogblog.htmlEventsevents.html
EventBlog PostPhotoHome⌂index.htmlBlogblog.htmlEventsevents.htmlPhotosphotos.html
Home⌂index.htmlBlogblog.htmlEventsevents.htmlPhotosphotos.htmlEventPhotoBlog Postblog-post.html
Home⌂index.htmlBlogblog.htmlEventsevents.htmlPhotosphotos.htmlPhotoBlog Postblog-post.htmlEventevent-detail.html
Home⌂index.htmlBlogblog.htmlEventsevents.htmlPhotosphotos.htmlBlog Postblog-post.htmlEventevent-detail.htmlPhotophoto-detail.html
templatesindex.htmlblog.htmlblog-post.htmlevents.htmlevent-detail.htmlphotos.htmlphoto-detail.html
templates...blog.htmlblog-post.html...!!
templates... blogblog.htmlblog-post.html...!
templates... blogindex.htmlblog-post.html...!
templates... blogindex.htmlpost.html...!
templatesindex.html blogindex.htmlpost.html eventindex.htmldetail.html photoindex.htmldetail.html
templatesindex.html blog event photo
templates!index.html blog event photolayout.html
{% extends "layout" %}!!{% block content %}...{% endblock %}
templateslayout.htmlindex.html blogindex.htmlpost.html eventindex.htmldetail.html photoindex.htmldetail.html
!!!{% for entry in craft.entries.section(['blog','event','photo']) %}{{ entry.title }}{% endfor %}index.html{% extends "layout" %}!{% block content %}{% endblock %}
!!!{% for entry in craft.entries.section('blog') %}{{ entry.title }}{% endfor %}blog.html{% extends "layout" %}!{% block content %}{% endblock %}
templateslayout.htmlindex.html! blog event phototeaser.html
{{ entry.title }}teaser.html
{% extends "layout" %}!{% block content %}{% for entry in craft.entries.section(['blog','event','photo']) %}!{% endfor %}{% endblock %}{% include 'teaser' %}index.html
{% extends "layout" %}!{% block content %}{% for entry in craft.entries.section(['blog','event','photo']) %}!{% endfor %}{% endblock %}{% include 'teaser-'~entry.section.handle %}index.html
templateslayout.htmlindex.htmlteaser.html!!! blog event phototeaser-blog.htmlteaser-event.htmlteaser-photo.html
{{ entry.title }}{{ entry.postDate.format("F jS, Y") }}teaser-blog.html{{ entry.title }}{{ entry.startTime.format("F jS, Y") }}{{ entry.location }}teaser-event.html
templateslayout.htmlindex.htmlteaser.htmlteaser-blog.htmlteaser-event.htmlteaser-photo.html blog event photo
{% extends "layout" %}!{% block content %}{% for entry in craft.entries.section(['blog','event','photo']) %}!{% endfor %}{% endblock %}{% include ['teaser-'~entry.section.handle, 'teaser'] %}index.html
templates!...teaser.htmlteaser-blog.htmlteaser-event.htmlteaser-photo.html...
templates!... teaserteaser.htmlteaser-blog.htmlteaser-event.htmlteaser-photo.html...
templates!... teaserteaser.htmlblog.htmlevent.htmlphoto.html...
templates!... teaserdefault.htmlblog.htmlevent.htmlphoto.html...
templates!...teaser.html teaserdefault.htmlblog.htmlevent.htmlphoto.html...
{% include ['teaser/'~entry.section.handle, 'teaser/default'] %}teaser.html
{{ entry.title }}teaser/default.html
{{ entry.title }}!!{% block teaserContent %}{% endblock %}teaser/default.html
{% extends "teaser/default" %}!{% block teaserContent %}{{ entry.postDate.format("F jS, Y") }}{% endblock %}{% extends "teaser/default" %}!{% block teaserContent %}{{ entry.startTime.format("F jS, Y") }}{{ entry.location }}{% endblock %}teaser/blog.htmlteaser/event.html
templateslayout.htmlindex.htmlteaser.html teaser blog event photo
templateslayout.htmlindex.htmlteaser.html teaserentry.html entrylanding.html landing
templateslayout.htmlindex.htmlteaser.html teaser!!landing.html landingentry.html entry
{% include ['entry/'~entry.section.handle, 'entry/default'] %}entry.html
templateslayout.htmlindex.htmlteaser.html teaserentry.html entry! landing.html landing
{% include ['landing/'~entry.channel, 'landing/default'] %}landing.html
{% extends "layout" %}!{% block content %}{% for entry in craft.entries.section(entry.channel) %}{% include 'teaser' %}{% endfor %}{% endblock %}landing/default.html
templateslayout.htmlindex.htmlteaser.html teaserentry.html entrylanding.html landing!
templateslayout.htmlindex.htmlteaser.html teaserentry.html entrylanding.html landing! matrix.html matrix
{% include 'matrix' with {'matrix': entry.body} %}entry/default.html
{% for block in matrix %}{% include ['matrix/' ~ block.type ~ '-' ~ entry.section.handle,'matrix/' ~ block.type] %}{% endfor %}matrix.html
matrix.html matrixblockquote.htmlblockquote-event.htmlgallery.htmlimage.htmlimage-blog.htmltext.html
templateslayout.htmlindex.htmlteaser.html teaserentry.html entrylanding.html landingmatrix.html matrix
{% include 'teaser' %}
{% include 'matrix' with {'matrix': entry.body} %}
{% include ['teaser/' ~ entry.section.handle, 'teaser/default'] %}!{% include ['entry/' ~ entry.section.handle, 'entry/default'] %}!{% include ['landing/' ~ entry.channel, 'landing/default'] %}!{% include ['matrix/' ~ block.type ~ '-' ~ entry.section.handle,'matrix/' ~ block.type] %}
@acolangelo