From 6020cae8694cb9b5ad6a0d9548c65910ecd2e394 Mon Sep 17 00:00:00 2001 From: Goffi Date: Thu, 30 Nov 2017 20:58:34 +0100 Subject: [PATCH] template: remove extension from elements while looking for a path: this way, extension doesn't need to be provided for a CSS file for a single page. --- src/tools/common/template.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/common/template.py b/src/tools/common/template.py index 683e4690..42782d66 100644 --- a/src/tools/common/template.py +++ b/src/tools/common/template.py @@ -299,12 +299,12 @@ class Renderer(object): def getThemeData(self, template_path): """return template data got from template_path - @return tuple(unicde, unicode, bool): + @return tuple(unicode, unicode, bool): path_elems: elements of the path theme: theme of the page is_default: True if the theme is the default theme """ - path_elems = template_path.split(u'/') + path_elems = [os.path.splitext(p)[0] for p in template_path.split(u'/')] theme = path_elems.pop(0) is_default = theme == C.TEMPLATE_THEME_DEFAULT return (path_elems, theme, is_default)