Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Summit 2023 [19th to 23rd March, Las Vegas and Virtual] | Complete AEM Session & Lab list

AEM - Select Experience Fragments in RTE (Rich Text Editor) Link Plugin | AEM Community Blog Seeding




AEM - Select Experience Fragments in RTE (Rich Text Editor) Link Plugin by Sreekanth Choudry Nalabotu


In the Path Field picker of RTE Link Plugin, Experience Fragments are NOT shown by default. This extension is to adjust /libs/cq/gui/content/linkpathfield/picker/views/column/datasource configuration synthetically during runtime and set exclude attribute to none so XFs can be selected and linked...

Create a filter apps.experienceaem.sites.core.filters.LinkPathFieldFilter to adjust the exclude configuration during request...

package apps.experienceaem.sites.core.filters;

import org.osgi.framework.Constants;
import org.osgi.service.component.annotations.Component;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.jcr.Node;
import javax.servlet.*;
import java.util.Map;

service = Filter.class,
immediate = true,
name = "Experience AEM Link path field Filter",
property = {
Constants.SERVICE_RANKING + ":Integer=-99",
public class LinkPathFieldFilter implements Filter {
private static Logger logger = LoggerFactory.getLogger(LinkPathFieldFilter.class);

public static String EXCLUDE = "exclude";
public static String EXCLUDE_NONE = "none";
public static String LINK_PATH_DS = "/libs/cq/gui/content/linkpathfield/picker/views/column/datasource";

public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
SlingHttpServletRequest slingRequest = (SlingHttpServletRequest) request;

Resource linkPathDSRes = slingRequest.getResourceResolver().getResource(LINK_PATH_DS);
linkPathDSRes.adaptTo(Node.class).setProperty(EXCLUDE, EXCLUDE_NONE);//set property for this request, not saved to CRX
}catch(Exception e){
logger.error("Error overriding property 'exclude'", e);

chain.doFilter(slingRequest, response);

public void init(FilterConfig filterConfig) throws ServletException {

public void destroy() {

Read Full Blog

AEM - Select Experience Fragments in RTE (Rich Text Editor) Link Plugin


Please use this thread to ask the related questions.

0 Replies

The ultimate experience is back.

Join us in Vegas to build skills, learn from the world's top brands, and be inspired.

Register Now