# HG changeset patch # User Goffi # Date 1512071914 -3600 # Node ID 7aa863cbc47f8d0d7b00017fc2b058a03bf10d07 # Parent d1153ce68ca0f76e05e75232b11870d8f0243d77 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. diff -r d1153ce68ca0 -r 7aa863cbc47f src/tools/common/template.py --- a/src/tools/common/template.py Thu Nov 30 20:53:47 2017 +0100 +++ b/src/tools/common/template.py Thu Nov 30 20:58:34 2017 +0100 @@ -299,12 +299,12 @@ 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)