Example: I have a component called component-X. I only want it to show when I am editing a page that resides inside /content/main/en.
------------------------------------------------------
I know I can control this using design mode but just trying to see if this can be done automatically/via code.
I tried allowedPaths and I guess it only works with templates.
Thanks