04-14-2020 04:46 AM
Hi Team,
I want to set Simple View as by default view in document library on site creation.
For that i have made changes in documentlist.js like below:
viewRendererName: "simple", but that didn't worked.
Can anyone please suggest what are the other changes are required ?
Thanks,
Hardik
04-14-2020 07:31 AM
Hi Hardik,
You need to set "defaultViewId" as simple which is property of "defaultViewConfig" aspect.
You can create rule on Sites folder and capture event of site-creation and add aspect.
You can create policy which capture site creation event and in that policy you can set default view.
Ex.
Map<QName, Serializable> viewProp = new HashMap<QName, Serializable>(); viewProp.put(ApplicationModel.PROP_DEFAULT_VIEW_ID, "simple"); nodeService.addAspect(folderNodeRef, ApplicationModel.ASPECT_DEFAULT_VIEW_CONFIG, viewProp);
Explore our Alfresco products with the links below. Use labels to filter content by product module.