-
Notifications
You must be signed in to change notification settings - Fork 20
Stash template inheritance
Mark Croxton edited this page Jun 29, 2018
·
20 revisions
The Stash template inheritance pattern allows you to build a base "skeleton" template that contains all the common elements of your site and defines variables and blocks that can be populated with content or optionally overridden by child templates ("partials").
It can be combined with the powerful routing add-on [Resource Router] (https://github.com/rsanchez/resource_router) to allow you to create simple and modular templates that are easy to maintain.
An illustrated introduction to the concept can be found here:
A full implementation of this pattern, with working code that you can dissect, was created as part of the EE Zen Garden challenge.
Getting started
Using Stash
Using Mustash
- Mustash
- Installing Mustash
- Managing variables
- Managing bundles
- Cache-breaking rules
- Mustash plugins
- Mustash Varnish plugin
- Mustash plugin development
- Mustash API
Template design patterns
Tag reference
- {exp:stash:set}
- {exp:stash:get}
- {exp:stash:block}
- {exp:stash:set_value}
- {exp:stash:append}
- {exp:stash:append_value}
- {exp:stash:prepend}
- {exp:stash:prepend_value}
- {exp:stash:copy}
- {exp:stash:context}
- {exp:stash:is_empty}
- {exp:stash:not_empty}
- {exp:stash:set_list}
- {exp:stash:get_list}
- {exp:stash:append_list}
- {exp:stash:prepend_list}
- {exp:stash:split_list}
- {exp:stash:join_lists}
- {exp:stash:list_count}
- {exp:stash:unset}
- {exp:stash:flush_cache}
- {exp:stash:bundle}
- {stash:embed}
- {exp:stash:extend}
- {exp:stash:parse}
- {exp:stash:cache}
- {exp:stash:static}
- {exp:stash:finish}
- {exp:stash:not_found}
- Short tag syntax
- Using Stash methods in your own add-ons