How can I create a hello world dashlet

cancel
Showing results for 
Search instead for 
Did you mean: 
agborrego92
Active Member

How can I create a hello world dashlet

I'm new in Alfresco. I need to personalize Share and the first way that came to my mind was creating dashlets for a site previously created. But even the simplest dashlet in docs(not very clear by the way) seems to be complicated for me right now. I read something about aikau dashlet that looks like the correct way, but again, pretty complicated for a hello world dashlet.

Any comment will be helpful.

I'm using Alfresco 5.2

2 Replies
calvo
Senior Member

Re: How can I create a hello world dashlet

Hello,

If you want to create a webscript dashlet you can follow this instructions:

1.- You must create a file: "helloworlddashlet.get.desc.xml" with the following content

<webscript>
<shortname>Dashlet</shortname>
<description>Dashlet that show a message</description>
<family>site-dashlet</family>
<url>/components/dashlets/sampledashlet</url>
</webscript>

2.- You must create a file: "helloworlddashlet.get.html.ftl" that contains the following code:

<div class="dashlet">
<div class="title">Dashlet example</div>
<div class="body">Hello world</div>
</div>

3.- You have to copy this files in the following path (maybe you have to create some folders): "tomcat/shared/classes/alfresco/web-extension/site-webscripts/org/alfresco/components/dashlets"


4.- Restart Alfresco Services, and if there's no errors you will have available a new dashlet.

To check your new dashlet, in Alfresco you have to select a Site and click on: "Personalize" button.
Click on "Add dashlets" button and select the dashlet you have just created.

Regards

afaust
Master

Re: How can I create a hello world dashlet

This hello world dashlet blog post I found via a Google search is still suprisingly valid even after 7 years, since a hello world dashlet is so simple that not a lot has changed that directly affects it. Though after a raw hello world dashlet you may want to look at an Aikau dashlet for future development.