Option for subfolders in layout and javascript, modified permissions