Jael supports template inheritance by means of extend and block.

    Note the following example:

    1. <!-- layout.jl -->
    2. <html>
    3. <head>
    4. <title>{{ title }} - My App</title>
    5. </head>
    6. <body>
    7. <block name="content"></block>
    8. <div class="footer">
    9. <!-- Footer content... -->
    10. </div>
    11. </body>
    12. </html>
    13. <!-- hello.jl -->
    14. <extend src="layout.jl">
    15. <block name="content">
    16. <img src=user.avatar ?? "http://example.com/img/default-avatar">
    17. Hello, {{ user.name }}!
    18. </block>
    19. </extend>

    To extend a layout, instead of the file containing an <html> node, create a file with an <extend> node. The src attribute should point to the correct file. Then, add <block> tags that will replace the corresponding <block> tags declared in the parent file.