How to overwrite the default functionality of RSS feed in the AEM?

拟墨画扇 提交于 2020-01-06 05:59:06

问题


AEM has the default functionality to get the RSS feed and atom. I need to overwrite the URL value in the RSS feed. How the default functionality of RSS feed works in AEM and how to overwrite that one.

There are few steps tried which don't work. They are

  1. Trying to overlay the same structure of /libs/fondation/... under the /apps/{project}/... and did custom changes under the /apps files. AEM basically search thing initially in /apps and then /libs.

  2. To cross check the process removed feed.jsp and feedentry.jsp from /libs/foundation/components/page/{file}. After the default RSS feed functionality works fine in my local.

URL to hit the RSS feed in local: http://localhost:{port}/{content path}/{page}.feed.rss.xml

Note: Version of AEM used is 6.4

The expected thing is to overwrite the URL of the RSS feed

Is anyone facing the same issue and the solution for overwriting the URL


回答1:


Since you are overlaying in /apps/<project>/ instead of /apps/ which is the default search path for the Sling.

Typically, Sling first searches in the /apps/ and then /libs/ and your changes are in /apps/<project> this is why the default code is being picked up from the /libs/.

You can resolve this in two ways -

  • Move your changes from /apps/<project>/ to /apps/ (easy but not recommended, as your changes are not in your project folder but outside of it)
  • Keep your changes in /apps/<project>/. To change the default search path of Sling, navigate to ./system/console/configMgr and change Resource Search Path field in Apache Sling Resource Resolver Factory configuration.



来源:https://stackoverflow.com/questions/56142683/how-to-overwrite-the-default-functionality-of-rss-feed-in-the-aem

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!