
/extras/components/preview, mirroring the structure used by Share's web preview, but in a separate subdirectory reserved for Share Extras add-ons.web-preview.get web script in the following directory in the Share webappWEB-INF/classes/alfresco/site-webscripts/org/alfresco/components/previewweb-preview.get.html.ftl. You should see that it inserts the standard web previewer using a JavaScript module, instantiated inside a <script> element.web-preview.get.html.ftl in the Media Previews source code. You will see that it uses a Freemarker <#if> directive to choose between the standard previewer and the custom ones, based on the content item's MIME type.<object> tag to reference the Flash .swf files directly. The benefit of wrapping the previewer with JavaScript code is that it allows you to apply more complex logic, such as detecting if the user has the correct version of Flash installed, or hooking the previewer into page events to update the preview when a new version of the content is uploaded.web-preview.get.html.ftl and place it into the following directory, after first creating any missing directories.<TOMCAT>/shared/classes/alfresco/web-extension/site-webscripts/org/alfresco/components/preview${url.context}/mydir/path/to/asset.swf, or in 3.4 ${url.context}/res/mydir/path/to/asset.swf. The url.context variable will automatically resolve to Share's webapp context path, i.e. share by default, and mydir/path/to should be the directory structure you created in the webapp.${url.context}/proxy/alfresco/api/node/${node.nodeRef?replace('://', '/')}/content in your Freemarker markup. To reference the content of a named thumbnail, add /thumbnails/imgpreview to the end of the URL, where imgpreview is the name of the thumbnail.web-preview.get.html.ftl. See the customised web-preview.get.html.ftl in Share Extras for an example, and note the override mechanism is exactly the same as for the .html.ftl template. You are recommended to use the <@script> and <@style> macros provided by component.head.inc, but note that with <@script> you will need to bundle a compressed version of your JavaScript file(s) with the -min.js suffix.You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.