Use "resource_path" TALES extension to get resource URL
authorThierry Florac <thierry.florac@onf.fr>
Tue, 16 May 2017 11:16:15 +0200
changeset 40 0ee62085ea82
parent 39 fb55452c24d9
child 41 509aefe2f45c
Use "resource_path" TALES extension to get resource URL
src/pyams_media/zmi/templates/video-thumbnail.pt
--- a/src/pyams_media/zmi/templates/video-thumbnail.pt	Tue May 16 11:15:35 2017 +0200
+++ b/src/pyams_media/zmi/templates/video-thumbnail.pt	Tue May 16 11:16:15 2017 +0200
@@ -1,10 +1,10 @@
 <div class="flowplayer"
 	 data-ams-plugins="flowplayer"
-	 data-ams-plugin-flowplayer-src="/--static--/pyams_media/flowplayer/flowplayer{MyAMS.devext}.js"
-	 data-ams-plugin-flowplayer-css="/--static--/pyams_media/flowplayer/skin/functional{MyAMS.devext}.css"
 	 data-ams-plugin-flowplayer-async="false"
 	 data-ams-callback="PyAMS_media.initPlayer"
-	 data-ams-callback-source="/--static--/pyams_media/js/pyams_media{MyAMS.devext}.js"
+	 tal:attributes="data-ams-plugin-flowplayer-src extension:resource_path('pyams_media.skin:flowplayer');
+					 data-ams-plugin-flowplayer-css extension:resource_path('pyams_media.skin:functional_css');
+					 data-ams-callback-source extension:resource_path('pyams_media.skin:pyams_media');"
 	 data-ams-flowplayer-events='{"pause": "PyAMS_media.getPlayerTime", "seek": "PyAMS_media.getPlayerTime"}'>
 	<video
 		tal:define="href extension:absolute_url(context);