Use "resource_path" TALES extension to get resource URL
authorThierry Florac <thierry.florac@onf.fr>
Tue, 16 May 2017 11:17:44 +0200
changeset 25 b233892afe9a
parent 24 ed726ebbad4b
child 26 5bca394e019e
Use "resource_path" TALES extension to get resource URL
src/pyams_portal/zmi/templates/layout.pt
--- a/src/pyams_portal/zmi/templates/layout.pt	Tue May 16 11:17:24 2017 +0200
+++ b/src/pyams_portal/zmi/templates/layout.pt	Tue May 16 11:17:44 2017 +0200
@@ -5,8 +5,8 @@
 	<div class="ams-widget"
 		 data-ams-focus-target
 		 data-ams-plugins="pyams_portal"
-		 data-ams-plugin-pyams_portal-src="/--static--/pyams_portal/js/portal{MyAMS.devext}.js"
-		 data-ams-plugin-pyams_portal-css="/--static--/pyams_portal/css/portal{MyAMS.devext}.css"
+		 tal:attributes="data-ams-plugin-pyams_portal-src extension:resource_path('pyams_portal:pyams_portal');
+						 data-ams-plugin-pyams_portal-css extension:resource_path('pyams_portal:pyams_portal_css');"
 		 data-ams-plugin-pyams_portal-callback="PyAMS_portal.template.initConfig">
 		<header>
 			<span tal:condition="view.widget_icon_class | nothing"