diff options
author | Parker Berberian <pberberian@iol.unh.edu> | 2020-01-30 13:33:35 -0500 |
---|---|---|
committer | Parker Berberian <pberberian@iol.unh.edu> | 2020-01-30 16:12:18 -0500 |
commit | 078273eb7db5a481a4131d44a943f3c9e34b6b88 (patch) | |
tree | 9e6e569e18712d77b8a65c6ebf4dda50ade1b55a /src/templates/README | |
parent | 899e1a4baa95d0bc6f0eef34de66f0e257174878 (diff) |
Adds Template Overrides
Changes the structure of the template directories to allow
a new project to define their own set of override templates
that inherit from a common base.
I have slightly modified landing.html here as an example.
In comming changes we will try to move all the "laas" specific
content into the laas directory
Change-Id: I46151be182de901f870debb247b305ea34ae77ba
Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
Diffstat (limited to 'src/templates/README')
-rw-r--r-- | src/templates/README | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/templates/README b/src/templates/README new file mode 100644 index 0000000..d058036 --- /dev/null +++ b/src/templates/README @@ -0,0 +1,25 @@ +We use a special directory structure here that allows you to define +your own set of templates than inherit from a common base. + +To create your own templates: + +Create your new directory as a sibling of base/ + `mkdir my_templates` + +Now you can override any template file in base/ by creating a file of the same name in my_templates. + +For example, to replace base/booking/booking_table.html, +you would create my_templates/booking/booking_table.html. Your template will be loaded instead of the original. + + +You can also inherit from the base templates. For example, if you +wanted to add to base/dashboard/landing.html, you can create +a template at my_templates/dashboard/landing.html and add this line to +the top of the file: + {% extends base/dashboard/landing.html %} + +This way you can add in new {% block %} tags to the parents and define only +the new content you need without affecting the default behavior. + + +When your template directory is ready, you must add it to your config.env |