Using include in templates
Oftentimes we need to break up our layout into smaller parts so that we can just include those smaller parts to compose a page. The include directive is just for that purpose.
Create views\header.dt and extract from views\mainlayout.dt this line:
Then create views\navbar.dt and extract from views\mainlayout.dt this content:
Then create views\footer.dt and extract from views\mainlayout.dt this line:
So what's left with views\mainlayout.dt is this:
Compile, run and refresh the browser. If you see no changes, you did good again.
Last updated