Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Implementing the templateCache in organisations list | Matthew Lemon | 2024-02-15 | 1 | -1/+4 |
| | | | | | | | | | | | The render() function at the moment requires a templateData struct to be passed to it, but prior to this commit, that struct only had an Operations field in it. We have now added an Organisations field too - the thinking being that we only add the data we need for the page in question and the other fields remain as nil values. As of this commit - the slice of Organisations passed is not rendered correctly by the template - just a raw data dump to prove it works. | ||||
* | Implemented template cache | Matthew Lemon | 2024-02-15 | 1 | -2/+39 |
| | | | | | | | | | | | | | | | | | This is not perfect. At the moment, the new render() function, introduced in this commit, expects a templateData{} struct which contains an Operations field. This will need to be made generic, or we have multiple render() functions to accommdate the different types of data struct we want to be able to pass to templates. Also, in this commit I had to get rid of the /pages/operations and /pages/organisation sub directories for now. This does not fit the newTemplateCache() function - also introduced here. This needs to be refactored if we want to have subdirectories of templates - or else we stick to putting them inside pages/ and we name them appropriately, as we have done here with operations_list and organisation_list templates. | ||||
* | wip: Cannot get the dynamic data to show up in template | Matthew Lemon | 2024-02-11 | 1 | -0/+7 |