cancel
Showing results for 
Search instead for 
Did you mean: 

thumbnail

friedman30
Champ in-the-making
Champ in-the-making
Hi all.

[size=75](a newbie question…) [/size]
I am trying to create a thumbnail view, which is different from the "Alfresco Thumbnail V0.2" solution.

All i need to do, is to add an aspect to every space or content, which will hold  a link to a thumbnail that i would store in the repository. (i can't use the "Alfresco Thumbnails" solution, since i have to use my own 'hand made' thumbnail, and not the one that "Alfresco Thumbnails" auto generates).

then - i want to show the thumbnail that i have pointed to, instead of the icon that currently shows in Alfresco default views.

How do i do that?
Is  there any good reference project that can help solving the problem?
:roll:
7 REPLIES 7

friedman30
Champ in-the-making
Champ in-the-making
anyone???

:?:  :?:  :?:

kevinr
Star Contributor
Star Contributor
Changing the icon that is displayed will require you to change the core BrowseBean class - as it generates the URLs to the icons based on the filename extension. You would need to make it so that the resolverFileType16 and resolverFileType32 inner classes search for your aspect and return the URL to the thumbnail image instead of the default icon if present.

Thanks,

Kevin

friedman30
Champ in-the-making
Champ in-the-making
thanks Kevin!!!

:arrow:

By now i've added a custom aspect (Thumbnail Aspect) that holds a link to the desired thumb.

How (and where from) do i read this property at run-time?  :?:
i could not find it anywhere…

Thanks,

Dror

kevinr
Star Contributor
Star Contributor
Properties can be get/set and aspects can be applied/removed through the NodeService API. There are many examples in the Alfresco code.

Thanks,

Kevin

friedman30
Champ in-the-making
Champ in-the-making
thanks Kevin,

I guess i was not specific enough,
I have a custom aspect, in which i want to get a link (path) from the user.

for that, in the aspect, i have defined an association, so that the user will get a dialog and chose the file to link to.

<aspect name="custom:ThumbnailAspect">
       <title>Thumbnail Aspect</title>
       <associations>
            <association name="custom:Thumbnail">
               <title>Thumbnail</title>
               <source>
                <many>true</many>
             </source>
               <target>
                  <class>cm:content</class>
                  <mandatory>false</mandatory>
                        <many>false</many>
                   </target>
               </association>
          </associations>
    </aspect>

How do i read (at runtime) the link that the user chose ? it is a part of the aspect, but it is defined within the association (is it really??)…
Is there any better way to get a path from the user??? :?

as much as i dig in to it, i can't find the place that this data is stored….

thanks,

Dror

kevinr
Star Contributor
Star Contributor
Which API are you using to read the value? Java/Javascript/FreeMarker?

Thanks,

Kevin

friedman30
Champ in-the-making
Champ in-the-making
It is Java.
(I'm editing the source code - from svn rev.569 )

by now i edited some .xml files, Browse.jsp & BrowseBean.java

Thanks.

Dror