You may have to extend the content finder component (Move the component from /libs to /apps in the same structure ). Use the currentPage.getPath() to build the path for the DAM assets to be displayed.
CQ engine by default looks for the component first in /apps before looking into /libs folder, thereby using your custom component
Please reach out to me for more queries