How to implement an RSS feed of a site within alfresco share? - alfresco

I am still learning alfresco and trying to get the feed dashlets to display a custom feed in share. The end goal is to have some sort of workflow in which the editing of certain components on a site site page within alfresco generate a feed element which will then be picked up by the feed dashlet. For now to test I created an xml feed file and put it in a document space in a collaborative site that was set to public and put its link in the feeds dashlet config but that doesn't work. Is there anyway to implement the functionality I'm after?

There are 2 options:
Create your own Dashlet. The current RSS-Feed Dashlet connects to the http connector(share-config-custom.xml), this is an external connector for which authentication is required. So copy the RSS-Feed Dashlet and rip this part out.
According to this JIRA enhancement , in Alfresco Enterprise 4.1.4 you can read internal Share Feeds! So this means you probably won't have to do any customization. So grap the SVN/GIT source of Enterprise tree and use Alfresco's code to build the Dashlet or extend/override it.

Related

Search for files in Alfresco based on the content model properties using Rest API

I'm trying to implement searching of files in Alfresco based on the properties of the content model of the document.
I found this ReST API:
GET /alfresco/s/slingshot/search?term={term?}&tag={tag?}&site={site?}&container={container?}&sort={sort?}&query={query?}&repo={repo?}
But I'm not sure how to pass the property name of the document in the query parameter.
For ex:
My docuemt content model is: dc:InvoiceModel
Property name is: dc:doctype.
So, I want to pass the dc:doctype as query parameter as Sales Invoice for example to fetch all the documents of the type Sales Invoice. The documents are inside a folder in the documentLibrary
I tried doing this:
http://localhost:8080/alfresco/s/slingshot/search?container=documentLibrary/newfolder&sort=dc:dc:doc...false&repo=true&startIndex=0&query={"dc:doctype":"Sales Invoice","datatype":"d:text"}
But I'm getting zero records found. Could you please help me do this.
Alfresco Version:
Alfresco Share v5.1.f
(r125711-b6, Aikau 1.0.63, Spring Surf 5.1.f, Spring WebScripts 6.5, Freemarker 2.3.20-alfresco-patched, Rhino 1.7R4-alfresco-patched, Yui 2.9.0-alfresco-20141223)
Alfresco Community v5.1.0
(r127059-b7) schema 10001
Thank you all!
be careful: slingshot is not a public API (but in 5.1 you don't have a public search API). In 5.2 you should use the Alfresco Content Services REST API
In this SO question you should already find you answer: Passing multiple search arguments to Alfresco slingshot search Webscript
some remarks:
container: could be one of the site container types like documentLibrary but only makes sense together with a site
query: (defaults to Alfresco FTS) should look like dc\:doctype:"Sales Invoice" but should be url encoded. You could also add a PATH query as shown in the answer above

How to create a new action in a folder in document library in Alfresco?

I have to create new action in folder inside document library.I have been trying to add an action but its not working out. I wan the action to available in this menu:
Need some help in the implementation. When I go into Alfresco Share interface, I see the concept of sites. I decided to create a site for our application. Then inside the site, I am able to create folders underneath the site, I also see a document library location, inside which as well I can create folders
I am having a hard time choosing or deciding on an approach. Tried implementing the concepts on repo but not sure how to reflect the changes in UI using share.

How to connect CDN in magnolia?

I am using Azure CDN, where i have published all my images,css,js files.Now I would like to get all the assets from CDN instead of DAM.
Could you please suggest me?
Thanks in advance.
Actually I would suggest to just add extra step to your publishing process that, when publishing resources from dam will also publish them to azure CDN using their API. Similarly when unpublishing, you remove resources from there too.
You should do that as a first step in publishing, and upon receiving identifier for the resource from CDN, you should store that in assets metadata and only then pass it over to the next publishing step to have dam resource published to your Magnolia public instance.
Then on the public instance, you would need to replace LinkTransformers (and also LinkTransformerManager) and/or maybe just Asset implementation (if you use that exclusively for assets) with a custom implementation that when requesting link to dam asset will use CDN identifier in the assets metadata to construct correct link pointing to the CDN rather than back to Magnolia.
HTH,
Jan
See the Creating a custom content app trail in the documentation - it shows how to integrate images from Flickr, you can customize it to integrate Azure.

Import/create a new template in Magnolia

I am following these steps: https://documentation.magnolia-cms.com/display/DOCS/Creating+a+page+template. I'm stopped at creating a page definition.
Magnolia does not see my helloWorld.jsp template. I'm using the Enterprise Edition (free trial) if it matters. I watched all tutorials, but I can not find the answer.
Yes, it probably matters.
When you are using EE, you can have defined multiple sites in single server and you don't necessarily want to have each template available in each site you define. So you need to tell Magnolia for which site you want to enable this template. To enable this template for all sites, go to STK group in AdminCentral and open SiteDefinitons app there. In Site Definitions, go to /default/templates/availability/templates and register your template there by creating Node named helloWorld with property id set to value templating:pages/helloWorld (ID is always in format module-name:path-to-template-from-templates-folder)
HTH,
Jan

How to search within a particular folder in alfresco

I have folders in share shared folder. Is there any way to specify share to search for a particular file in particular folder of the shared folders?
Yes, but there is no user friendly out of the box solution (I know of).
As admin, go to http://your-host.domain.name/share/page/console/admin-console/node-browser and execute a (fts-alfresco) search like the following:
PATH:"/app:company_home/app:shared//*" AND #cm\:name:"filename.txt"
This will find all files named "filename.txt" below the shared folder.
I guess you will have to customize the search UI if you want to offer that functionality in a user friendly fashion or to non admin users.
Further details are at http://wiki.alfresco.com/wiki/Search#Path_Queries
We've developed a solutions where you can search within a folder through the advanced search form: http://addons.alfresco.com/addons/alfresco-share-folder-search
It's free for download so you can look around how it's done.
In short: in 4.2.e you can send an extra param rootNode to the /slingshot/search repo webscript.
If you check the client side JavaScript in Share components/search/search.js
There is method _buildSearchParams The following params are send: site={site}&term={term}&tag={tag}&maxResults={maxResults}&sort={sort}&query={query}&repo={repo}&rootNode={rootNode}&pageSize={pageSize}&startIndex={startIndex}
So fill in the rootNode with a qnamePath or NodeRef and it will present the results of that folder.
For a possible implementation, I wrote a long post about it on the alfresco community forum .

Resources