Posts

Customization of parsys to limit number of components and also components paths in AEM 6.3

Image
1. Create a clientlib with category cq.authoring.dialog and register below js in js.txt file. 2. This js is for restricting components paths and limit in parsys under columncontrol component .It can be applied to other components by changing CUSTOM_COLUMN_COMPONENT value to component name (it should be same as the component name mentioned under the  component folder i.e.,apps/myproject/component/columncontrol)  3.With below js we can LIMIT components count to 10 and components paths can be limited to the paths mentioned in ALLOWED_COMPONENTS parsys-listener.js (function ($, $document) { "use strict"; var COMPONENTS_LIMIT = 10; var CUSTOM_COLUMN_COMPONENT="columncontrol"; var ALLOWED_COMPONENTS =["/apps/weretail/components/content/button","/apps/weretail/components/content/title","/apps/weretail/components/content/text"]; function getDesignPath(editable){ var parsys = editable.getParent