Hi!,
I wonder if someone has achieved what I'll post here. In order to allow a template to be created under a certain path, there is a flag allowedPaths that receives a regex.
So, if I want my template "test" to appear only under /content/www/xx/xx/test-templates and child elements, I can do this:
/content/www/.*/.*/test-templates(/.*)?
But what if I want to make the opposite? I want the template "test" to appear in every /content/www/xx/xx/ node and beyond, EXCEPT /content/www/xx/xx/test-templates and children?
I have tried several ways but no luck so far. Do you have some hint regarding this?
Thanks!
Solved! Go to Solution.
Views
Replies
Total Likes
At the end it seems that http://stackoverflow.com/questions/34905975/aem-how-to-restrict-a-template-from-showing-in-a-certain... response worked as expected.
Thank you all!
See this KB:
https://helpx.adobe.com/experience-manager/kb/LimitChildPages.html
But there does not seem to be a way to restrict only a part of an allowed JCR path.
Views
Replies
Total Likes
Thank you sir! I took a look at that article and also asked this question http://stackoverflow.com/questions/34905975/aem-how-to-restrict-a-template-from-showing-in-a-certain.... There's a promising comment there, which probably I could use with allowedPaths in order to restrict those paths that does not match the given regex.
I'll post my results here in a few :)
You can try the following pattern for this use case-
^/content/www/xx/xx/(?!(test-templates)).*$
Hi,
I found the pattern content\/www\/xxx\/xxx\/xxx\/legal\/(?!(test)).*$ this will work for your usecase
Kunal i think same as ur regex may be i am late :)
Thanks
Mani Kumar K
Thank you! but those xx are intended to be anything (.*) and when you do this the regex changes :-\
At the end it seems that http://stackoverflow.com/questions/34905975/aem-how-to-restrict-a-template-from-showing-in-a-certain... response worked as expected.
Thank you all!
Views
Likes
Replies
Views
Likes
Replies