cancel
Showing results for 
Search instead for 
Did you mean: 

How can we overide the CMSLinkComponent, to remove the title that is displayed by default?

Former Member
0 Kudos

We tried doing these in the following ways: Overriding the bean, modifying the renderer as well as corresponding jsp too.

Accepted Solutions (1)

Accepted Solutions (1)

segalerba
Explorer
0 Kudos

Hello Naveen, I would recommend creating another type but if the requirement is to modify the way CMSLinkComponent is displayed, I would take advantage of the fact that CMSLinkComponentController is not there and create it,

 extending AbstractCMSComponentController<CMSLinkComponentModel>
 @Override
     protected String getView(CMSLinkComponentModel component) {
 return "path to the new jsp";
 }

It's important to take into account that if you are working on an addon it extends AbstractCMSAddonComponentController and the path to the file would look something like this: addon:/yourcomponentsaddon/cms/cmslinkcomponent

Hope it helps!

Regards, Guille

Former Member
0 Kudos

Thanks Guillermo, adding to your answer. We also need to override the default link component renderer.You can do that, by extending the addonCMSComponentRendererRegistry bean and map defaultCmsComponentRenderer (which will call our own controller) for CMSLinkComponent.

Answers (0)