pathbrowser works when I point it to DAM location but I don't see static css files under "etc/designs" folders. What should I do to enable static files with "pathbrowser" ?
<view
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/pathbrowser"
rootPath="/etc/designs/alpha/css"
name="./css"
fieldLabel="CSS File"/>
Thanks
Solved! Go to Solution.
Thanks Amit for pointing me to right direction. I just added predicate="hierarchy" to the field:
<ccfile jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/form/pathbrowser" rootPath="/etc/designs/alpha/css" predicate="hierarchy" name="./cssfile" fieldLabel="CSS File"/>
Views
Replies
Total Likes
You have to override the OOTB component i.e. /libs/granite/ui/components/foundation/form/pathbrowser
This is designed to get everything but files, in this component predicate is built only for hierarchyNotFile.
i.e. String predicate = cfg.get("predicate", "hierarchyNotFile"); // 'folder', 'hierarchy', 'hierarchyNotFile' or 'nosystem'
override this and modify the jsp to get the desired results.
Thanks Amit for pointing me to right direction. I just added predicate="hierarchy" to the field:
<ccfile jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/form/pathbrowser" rootPath="/etc/designs/alpha/css" predicate="hierarchy" name="./cssfile" fieldLabel="CSS File"/>
Views
Replies
Total Likes
Views
Likes
Replies