Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
How to deactivate/modify automatic canonical url generator in liferay 7.3?
Hi,
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?
@Akhil Raj, please to share the solution if it is founded
I 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™