AnsweredAssumed Answered

Aikau: How to add a new aikau document-detail page on the doclib.lib.js?

Question asked by ana.areces on Feb 10, 2017
Latest reply on Feb 17, 2017 by ana.areces

Hello. 

 

I'm nearby new on this world of Aikau and i'm trying to develop an independent aikau client without the use of Share. The idea it's to create a much more simple client to allow the user to perform some simple actions without all the share posibilites. 

 

The problem is that i wanna create a new preview for the documents. I have the page created and it works. it's show the preview and some metadata property for my custom model. But as i'm using the doclib.lib.js, the Aikau Document Library, i'm not able to publish the topic on the document clicking to publish navigate over my new Document-detail ws. 

 

I was checking over the the community mainly on the Dave Draper tutorial and blog (who does a great job with aikau learning) but i didn't find any clue. 

 

Thanks in advance,

 

Ana Areces

 

I let you a piece of my code where I use the doclib:

<import resource="classpath:alfresco/site-webscripts/org/alfresco/aikau/{aikauVersion}/libs/doclib/doclib.lib.js">

var myFilesOptions = {
idPrefix: "MY_FILES_",
siteId: page.url.templateArgs.site,
containerId: "documentLibrary",
rootNode: "/app:company_home/st:sites/cm:gdp/cm:documentLibrary",
rootLabel: "My Files",
rawData: true,
useHash: true,
waitForPageWidgets: false,
breadcrumbTrail: {
lastBreadcrumbPublishTopic: "NO_OP"
}
};

var toolbarOptions =
{
idPrefix: "MY_FILES_",
siteId: page.url.templateArgs.site,
containerId: "documentLibrary",
rootNode: "/app:company_home/st:sites/cm:gdp/cm:documentLibrary",
rootLabel: "My Files",
rawData: true,
useHash: true,
waitForPageWidgets: false,
breadcrumbTrail: {
lastBreadcrumbPublishTopic: "NO_OP"
},
additionalCreateContentItems: []
};

model.jsonModel =
{
services: [
"alfresco/services/LogoutService",
"alfresco/services/SiteService",
"gdp/gdpService",
{
name: "alfresco/services/DocumentService",
config:{
rawData:true
}
},
{
id: "MANAGE_ASPECTS_SERVICE",
name: "alfresco/services/actions/ManageAspectsService",
config: {
availableAspects: ["cm:generalclassifiable",
"cm:complianceable"]
}
},
{
id: "NODE_LOCATION_SERVICE",
name: "alfresco/services/actions/NodeLocationService",
config: {
useAikauPages: true,
}
},
{
name: "alfresco/services/LoggingService",
config: {
loggingPreferences:
{
enabled: true,
all: true
}
}
}
].concat(getDocumentLibraryServices()),
widgets: [
{
name: "gdp/Header"
},
{
name:"alfresco/layout/StripedContent",
config:{
widgets:[
getDocLibToolbar(toolbarOptions),
getDocLibBreadcrumbTrail(myFilesOptions),
getDocLibList(myFilesOptions)

]
}
}
]
};

Outcomes