Ask - Test
How to deactivate/modify automatic canonical url generator in liferay 7.3?
How to deactivate/modify automatic canonical url generator in liferay 7.3?
New Member Posts: 2 Join Date: 12/31/24 Recent PostsHi,
i am using Liferay DXP 7.3 and i have automatically generated canonical urls for my site..
I have 4 locales selected for my site and i want to generate canonical urls for only 2 of them..But liferay automatically generates canonicals for all the 4 locales selected. Also liferay is not appending the language code for the alternate url generated for the default language. i have to override this behaviour also..
How can i achieve this?
i have tried using a dynamicInclude and generated custom urls programatically to top_head.jsp..
But i have to disable the automatic url generation so that only the urls from dynamicinclude appears on the html..How can i deactivate automatic canonical url generetaion in liferay?
RE: How to deactivate/modify automatic canonical url generator in liferay 7.3?
New Member Post: 1 Join Date: 4/8/25 Recent Posts@Akhil Raj, please to share the solution if it is founded
RE: RE: How to deactivate/modify automatic canonical url generator in liferay 7.3?
New Member Posts: 2 Join Date: 12/31/24 Recent PostsI found the solution by adding a hook.
The auto Url generation cannot be deactivated. instead i have used a hook to override the service that is building this url patterns in page source.
We have to override the service
LayoutSEOLinkManagerImpl
using a hook.
deploy the hook and then we have to blacklist the original component from System settings -> Module container -> Component blacklist
Powered by Liferay™