tpl: Ensure site templates can override theme templates
authorCameron Moore <moorereason@gmail.com>
Mon, 5 Feb 2018 04:13:52 +0000 (22:13 -0600)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Mon, 5 Feb 2018 07:38:04 +0000 (08:38 +0100)
The tplimpl package was misusing the TemplateLookupDescriptor.WorkingDir
field from the output package. By incorrectly setting it to the theme
directory instead of the site root, the user is unable to override theme
templates in some situations.

Fixes #3505

tpl/tplimpl/template.go

index e13dd0aaad8efca8ba74c1bcb2ba641d9c0da5f8..25757abc426b27c263f04d1afbbdea05f8ad34b5 100644 (file)
@@ -443,7 +443,6 @@ func (t *templateHandler) loadTemplates(absPath string, prefix string) {
                        )
 
                        if themeDir != "" && strings.HasPrefix(absPath, themeDir) {
-                               workingDir = themeDir
                                layoutDir = "layouts"
                        }