如何覆盖AEM中RSS feed的默认功能? [英] How to overwrite the default functionality of RSS feed in the AEM?

查看:63
本文介绍了如何覆盖AEM中RSS feed的默认功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

AEM具有获取RSS提要和原子的默认功能.我需要覆盖RSS feed中的URL值. RSS feed的默认功能如何在AEM中工作以及如何覆盖该功能.

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. 尝试在/apps/{project}/... 下覆盖/libs/fondation/...的相同结构,并进行自定义/apps 文件下的更改. AEM基本上首先在/apps 中搜索事物,然后在/libs 中搜索事物.

  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.

要进行交叉检查,请从/libs/foundation/components/page/{file}中删除feed.jsp和feedentry.jsp.默认RSS提要功能在我的本地正常运行后.

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.

要在本地访问RSS提要的URL: http://localhost :{port}/{content path}/{page} .feed.rss.xml

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

注意:使用的AEM版本为 6.4

Note: Version of AEM used is 6.4

期望的是覆盖RSS feed的URL

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

有人遇到相同的问题以及覆盖URL的解决方案

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

推荐答案

由于您要覆盖/apps/<project>/而不是/apps/,它是吊索的默认搜索路径.

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

通常,Sling首先在/apps/中搜索,然后在/libs/中进行搜索,而您的更改在/apps/<project>中,这就是为什么从/libs/中拾取默认代码的原因.

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 -

  • 将更改从/apps/<project>/移至/apps/(简单但不建议这样做,因为所做的更改不在项目文件夹中,而是在项目文件夹之外)
  • 将更改保存在/apps/<project>/中.要更改Sling的默认搜索路径,请导航到./system/console/configMgr并更改 Apache Sling Resource Resolver Factory 配置中的资源搜索路径字段.
  • 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.

这篇关于如何覆盖AEM中RSS feed的默认功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆