-
Type:
Feature Request
-
Status: Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Liferay Themes, ~ [Archived] Themes Infrastructure
-
Labels:None
According to Liferay Official THEMELETS documentation (https://dev.liferay.com/fi/develop/tutorials/-/knowledge_base/7-0/themelets) -
Themelets allow developers to easily share code snippets across their themes and with other developers. A themelet can consist of CSS, JavaScript, and templates, just like a theme.
We tried to develop FTL template based themelet and installing the same into custom theme . But theme deployment failing with following exception -
Template inclusion failed (for parameter value "/sample-theme_SERVLET_CONTEXT_/templates/nav.ftl"):Unable to find FreeMarker template with ID sample-theme_SERVLET_CONTEXT/templates/nav.ftl_---
_FTL stack trace ("~" means nesting-related):- Failed at: #include "${full_templates_path}/nav... [in template "sample-theme_SERVLET_CONTEXT_/templates/portal_normal.ftl" at line 48, column 25]_--- [Sanitized]
Posted this on Slack as well. After discussion with Michael Williams we got to know that template based themelet is not supported. Please read below his full response on slack -
"It appears you cannot inject theme templates into your theme with a themelet. Themelets are just used to extend an existing theme with CSS or JS. To add a template, your best bet is to add it in your existing theme and include it with the syntax I showed. Adding templates with a themelet would be a good feature request though. You should submit one. I'll update our docs so it's clear that you can only extend CSS and JS with themelets".
So, It would be great to have template support in themelets.