Sub-Views

It's really simple to include Aah files (sub-views, etc.) within other Aah files.

@include(filename)

Files within folders can be included using "dot syntax".

@include(folder.filename)

Note: The .aah extension should not be included. filename NOT filename.aah

Example

header.ahh

+header
    +h1: My Website

main.aah

+html
    +head
        +title: Aah!
        +meta{"http-equiv" => "Content-Type", "content" => "text/html; charset=utf-8"}
        +link{"rel" => "stylesheet", "href" => "main.css", "type" => "text/css"}
    +body
        @include(header)
        +main
            @include(section)
            +p
                Hello my name is %name. This is an example of an Aah document.
            +p
                Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod.
            +h3: My Favorite Shows
            +ul
                ?foreach(%shows as %show):
                    +li: %show
                ?endforeach
        +footer
            +p
                ©2015 My Page