diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-04-06 18:00:20 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-04-06 18:00:20 -0400 |
| commit | 4a19e4d9d9b2f952e9afd93311ef19dc395ac46a (patch) | |
| tree | 5b8892d2ad46c2827ac16e5052f11d1abb207c70 /doc/build/caching.rst | |
| parent | 266abebaf9aad33e139f5f2ebd50ad604d6f3f86 (diff) | |
| download | external_python_mako-4a19e4d9d9b2f952e9afd93311ef19dc395ac46a.tar.gz external_python_mako-4a19e4d9d9b2f952e9afd93311ef19dc395ac46a.tar.bz2 external_python_mako-4a19e4d9d9b2f952e9afd93311ef19dc395ac46a.zip | |
- New tag: <%block>. A variant on <%def> that
evaluates its contents in-place.
Can be named or anonymous,
the named version is intended for inheritance
layouts where any given section can be
surrounded by the <%block> tag in order for
it to become overrideable by inheriting
templates, without the need to specify a
top-level <%def> plus explicit call.
Modified scoping and argument rules as well as a
more strictly enforced usage scheme make it ideal
for this purpose without at all replacing most
other things that defs are still good for.
Lots of new docs. [ticket:164]
Diffstat (limited to 'doc/build/caching.rst')
| -rw-r--r-- | doc/build/caching.rst | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/doc/build/caching.rst b/doc/build/caching.rst index 6cf7197..19656c8 100644 --- a/doc/build/caching.rst +++ b/doc/build/caching.rst @@ -5,7 +5,7 @@ Caching ======== Any template or component can be cached using the ``cache`` -argument to the ``<%page>`` or ``<%def>`` directives: +argument to the ``<%page>``, ``<%def>`` or ``<%block>`` directives: .. sourcecode:: mako @@ -32,6 +32,14 @@ The caching flag and all its options can be used with the other text </%def> +... and equivalently with the ``<%block>`` tag, anonymous or named: + +.. sourcecode:: mako + + <%block cached="True" cache_timeout="30" cache_type="memory"> + other text + </%block> + Cache arguments ================ |
