cancel
Showing results for 
Search instead for 
Did you mean: 

Getting all web content in a dashlet

dynamolalit
Champ on-the-rise
Champ on-the-rise
Hi,

I want to create a dashlet where content administrator can see all the content created by all others in all the web projects as a list so that administrator can see list of all the documents.

Can somebody help?
3 REPLIES 3

dranakan
Champ on-the-rise
Champ on-the-rise
Hello,

Look in the configuration of your dashboard and add the "document list", is it what you want ?

If you want to create your own dashlet, take a look here : http://livinginjava.blogspot.com/2008/11/how-to-create-custom-dashlet-in.html

And also here (to show documents in space store… modify it ) : http://wiki.alfresco.com/wiki/FreeMarker_Template_Cookbook#Documents_in_User.27s_Home_Space_Example

Best regards

dynamolalit
Champ on-the-rise
Champ on-the-rise
Hi,

Thanks for reply.I have already added "Document List " dashlet to my dashboard but this dashlet shows content only from logged in user space or some other space like "Data Dictionary/Web Forms" which i have created/added but not from web projects created by me!!I want all the content present in all the web projects to be shown in a dashlet that administrator can view.I tried to modify "doclist.get.html.ftl" for "Document List " dashlet under ..\WEB-INF\classes\alfresco\templates\webscripts\org\alfresco\portlets to get content from Web Projects but its not successful.It is using Yahoo APIs & MooTools APIs to get the content.Its showing docs using :

<th><a id="docFilter0" class="docfilterLink <#if filter=0>docfilterLinkSelected</#if>" href="#" onclick="MyDocs.filter(0); return false;"><span>All Items</span></a></th>

Here MyDocs is a JS object in doclist.js file under ../scripts/ajax with some properties & methods.Code snippet which is being used to get content is as :

var MyDocs = {
…..
YAHOO.util.Connect.asyncRequest(
            "GET",
            MyDocs.ServiceContext + '/ui/doclistpanel?f=' + MyDocs.Filter + '&q=' + MyDocs.Query + (MyDocs.Home != null ? '&h=' + MyDocs.Home : ''),
….}

I tried to change both "MyDocs.ServiceContext" & "MyDocs.Home" here , tried these to give path of companyhome like "home=companyhome.childByNamePath["Web Projects/creatorprj"]>" or "home=companyhome.nodeByReference["workspace://SpacesStore/dba6e0f6-466d-498a-a277-9cecdf7de655"]" for particular web project or using xpath query like "home=companyhome.childrenByXPath["*[@cm:name='Web Projects']" in ftl file & tried to change"MyDocs.ServiceContext=http://localhost:8080/alfresco/service/sample/avm/stores" to set it to avm stores but it is not showing any content from any of the web projects.What i have observed is that it is not able to get the contents from web projects as web project have a definite structure & sandboxes & these are dynamic.Correct me if i am wrong!!So how can i get the content related to web projects.

Is there any other web script we can use or any way to modify the original one to get desired results or do we need to create a new script.

Any help will be appreciated.

kmehta31
Champ in-the-making
Champ in-the-making
Hi,

I am not sure if you have visited this page. I think this is what you are trying to do.
http://wiki.alfresco.com/wiki/Web_Scripts_Examples - See section WCM Store List and WCM Folder Browse Example.

Company Home is used only for DM Space and not for Alfresco WCM Stores.

The following webscript mentioned in WCM Store List will show you all the stores present.
1) Start you alfresco and type following in URL your web browser - http://localhost:8080/alfresco/service/sample/avm/stores
It will list down all existing store. This list will include User Sand box as well so its upto you whether you want to monitor user sand box activity or activity within Staging Sandbox. I think Looking under ROOT ie Staging would suffice your requirement.

You need to iterate over each store and build your logic to display items under each store.
One such example is given right in WCM Folder Browse Example.

If you need any more help just let me know. But I think this should achieve your objectives.

Kalpesh