AnsweredAssumed Answered

How to add Images filter in myspaces web script?

Question asked by relax on Feb 2, 2010
Latest reply on Feb 3, 2010 by relax
Hello,
I would add a Images filter in
GET /alfresco/wcservice/ui/myspaces?f={filter?}&p={path?}
web script.
To verify that a content is an image I want to check the mimetype in
GET /alfresco/wcservice/ui/myspacespanel?f={filter}&p={path}&h={home}

myspacepanel.get.html.ftl - original

         <#if d.isDocument>
            <a href="javascript:SelectFile('${url.context}${d.url}');"><img class="spaceIconImage" alt="" width="16" height="16" src="${url.context}${d.icon16?replace(".gif",".png")}" border=0></a>
         <#elseif d.type="{http://www.alfresco.org/model/application/1.0}folderlink">
            <#– the component parts need to build up an encoded url to the outer webscript –>
            <#– the client-side url encoder method of the outer webscript runtime will be used –>
            <span class="spaceNavLinkUrl">${url.serviceContext}/ui/myspaces?f=${args.f}&amp;p=${encodepath(d.properties.destination)}&amp;rp=${args.rp}</span>
            <span class="spaceNavLinkImg" style="display:none"><img class="spaceIconImage" alt="" width="16" height="16" src="${url.context}${d.icon16?replace(".gif",".png")}" border="0"></span>
         <#else>
            <span class="spaceNavLinkUrl">${url.serviceContext}/ui/myspaces?f=${args.f}&amp;p=${args.p?url}%2F${d.name?url}&amp;rp=${args.rp}</span>
            <span class="spaceNavLinkImg" style="display:none"><img class="spaceIconImage" alt="" width="16" height="16" src="${url.context}${d.icon16?replace(".gif",".png")}" border="0"></span>
         </#if>

What is the test to be performed to verify that content is an image in myspacepanel.get.html.ftl?

Thank you.

Outcomes