Foren

path of js in custom_freemaker theme

abhishek kumar, geändert vor 8 Jahren.

path of js in custom_freemaker theme

Regular Member Beiträge: 138 Beitrittsdatum: 17.08.15 Neueste Beiträge
hello folks,
somehow i stuck in middle of one of the task _

how to give the path of js in mine custom_freemaker_theme. ??

thanks
Abhishek
thumbnail
Bijan Vakili, geändert vor 8 Jahren.

RE: path of js in custom_freemaker theme (Antwort)

Expert Beiträge: 375 Beitrittsdatum: 10.03.09 Neueste Beiträge
Note the theme init.ftl file; for Lifeary 6.2.x it is:
https://github.com/liferay/liferay-portal/blob/6.2.x/portal-web/docroot/html/themes/_unstyled/templates/init.ftl


In particular there's this assignment:

<#assign javascript_folder = theme_display.getPathThemeJavaScript() />


So you can use variable here:

javascript_folder

To create the path to the JS files; for example Liferay does this as well:
<#assign js_main_file = htmlUtil.escape(portalUtil.getStaticResourceURL(request, "${javascript_folder}/main.js")) />
abhishek kumar, geändert vor 8 Jahren.

RE: path of js in custom_freemaker theme

Regular Member Beiträge: 138 Beitrittsdatum: 17.08.15 Neueste Beiträge
thanku sir it is working !emoticon