Expand my Community achievements bar.

SOLVED

Restricting table/rte plugin modifications based on the site

Avatar

Level 9

I have overlaid table/ rte  plugins for some enhanced features, it works fine when I use it on components. However not all the sites on this server require those enhanced features,

Is there any way to configure these overlaid functions based on the site. By default all sites use the out of box rte plugins, unless we specify.

I thought of putting this plugins in /apps/<mysite>/cq/ui/..... resolve the problem, but it didn't. I still see that all the sites use the overlaid features

1 Accepted Solution

Avatar

Correct answer by
Level 10

oh! now I get what you are trying to do.. I dont think there are any ways to refer manually from either apps or libs. 

Let me think and see If any solutions strikes !!

View solution in original post

7 Replies

Avatar

Level 10

I have not seen anything on the docs that state that you can restrict content under /apps (ie - components) - based on domains/sites. If you do not need component A on site B - then its up to the authors not to use them. There are lots of components that are not used on a given sidekick. 

Avatar

Level 9

I have only one rte text component used across all the sites. All the sites have same rte plugins features.

Let me clarify with the simple example, I have modified link to have an additional field for title in href. So authors can add title attribute text.

Currently out of box supports only href, target, text inside anchor tag.

I modified LinkDialogProperties.js as an overlaid file in my /apps folder for this additional field title.

On Site A I want to load features from enhanced overlaid library /apps/cq.../LinkDialogProperties.js so that users

can author and see the title attribute 

On Site B I want to load features from out of box library /libs/cq/...../LinkDialogProperties.js, users on this site should not see any new features added from /apps/cq library

Basically it is the library that needs to be loaded whether I want out of box functionality or enhanced functionality.

Avatar

Level 9

I looked at dynamic rte configuration unfortunately it does satisfy my requirements, all the sites use same plugin features. It is only the overlay that needs to be loaded differently.

For Example

On Site A, I need to use modified overlay from /apps/cq/......

On Site B, I need to use out of the box overlay from /libs/cq .....

On Site C, I need to use out of box overlay from /libs/cq

and soon

Avatar

Level 10

 I dont think we can load the library dynamically. 

You can create a new RTE component with the overlaid library and make it available on the sites required and on all the other sites OOB RTE Component will be available.

Avatar

Level 9

bsloki wrote...

 I dont think we can load the library dynamically. 

You can create a new RTE component with the overlaid library and make it available on the sites required and on all the other sites OOB RTE Component will be available.

 

Hi Bloski,

 

Do you mean to say create new component and enhance the rte features? 

Lets take text component I just see I do see only 3 line of code

%><%@include file="/libs/foundation/global.jsp"%><%
%><cq:text property="text" escapeXml="true"
        placeholder="<%= Placeholder.getDefaultPlaceholder(slingRequest, component, null)%>"/>

I don't know from where it is loading the libraries, how do I configure this component to use LinkDialog.js

from out of box /libs vs /apps. If so what will be location of my LinkDialog.js file

Could you please elaborate on how to do this? Is there any documentation for this.

Avatar

Correct answer by
Level 10

oh! now I get what you are trying to do.. I dont think there are any ways to refer manually from either apps or libs. 

Let me think and see If any solutions strikes !!