cancel
Showing results for 
Search instead for 
Did you mean: 

path to source for aikau widget

npavlov
Confirmed Champ
Confirmed Champ

Hi,

I'm new to Aikau. 

I want to put picture to my page, so i use that construction:

{
    name: "alfresco/html/Image",
    config:{
        src: "tag-02.png"
    }
}


but there is a broken image in browser (see attached file),
where to put the file with the picture and how to specify the path to it in that widget?

P.S. i'm using Share and my page is in tomcat/shared/classes/alfresco/web-extension/site-webscripts/org/alfresco/share/pages

1 ACCEPTED ANSWER

afaust
Legendary Innovator
Legendary Innovator

You should always check the JSDoc for the widget you are using. In this case it states that "src" is used in conjunction with "srcType". The "srcType" allows you yourself to specify how the "src" is to be resolved. Also, you can also check the network tab of your browser to see which URL is currently being tried to be resolved for the image and use that...

View answer in original post

4 REPLIES 4

kalpesh_c2
Star Collaborator
Star Collaborator

Hi , Nikolay Pavlov

please refer this aikau tutorial Aikau/Tutorial1.md at develop · Alfresco/Aikau · GitHub to create custom widget or how to use OOTB widgets.

The OOTB aikau widgets files are available in the jar <alfresco-hom>\tomcat\webapps\share\WEB-INF\lib\aikau-*.jar

Thanks,
Kalpesh

Hi,

Unfortunately, I can not find there an example of adding a widget with my resource (pictures in my case). I know how to add default widgets on the page, but dont know how to add my resource to them. So it would be great if you say where I should put my image file in tomcat hierarchy and how to set "src" parameter in widget.

afaust
Legendary Innovator
Legendary Innovator

You should always check the JSDoc for the widget you are using. In this case it states that "src" is used in conjunction with "srcType". The "srcType" allows you yourself to specify how the "src" is to be resolved. Also, you can also check the network tab of your browser to see which URL is currently being tried to be resolved for the image and use that...

npavlov
Confirmed Champ
Confirmed Champ

Thank you. I saw this option but did not pay enough attention to it.