How to set TAL condition to check the file type and accordingly render the template in Plone 4.1
问题 How to use the tal condition to check the file type and render the template in Plone 4.1 My file preview template rendering depends upon the file extension. If file extension is 'pdf', I wish to use something like this:(just started working with TAL, TALES, METAL) <tal:define="file_nm global string:${here/absolute_url}" <tal:condition="file_nm.slice[-3:] = 'pdf'"> <embed width="100%" height="100%" name="plug-in" tal:attributes="src string:${here/absolute_url}#" draggable="false" onselectstart