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
RE: Friendly URL multiple routes
Hello!
i'm using Liferay 7.0 and we want to create a module with friendly url, we need create routes like this:
thank you so much community!
i'm using Liferay 7.0 and we want to create a module with friendly url, we need create routes like this:
- /sample/{sampleId}
- /example/{exampleId}
- /noob/{noobId}
- /blogs/sample/{sampleId}
- /blogs/example/{exampleId}
- /blogs/noob/{noobId}
thank you so much community!
Yea, should be possible. Just create multiple *route.xml files and then in your FriendlyURLMapper, you can specify different prefixes for each route.xml
How ?
In Liferay, you define one function whatever the route is
Unless I can define as many XXXFriendlyURLMapper as I want. Need to test.
In Liferay, you define one function whatever the route is
@Override
public String getMapping() {
return _MAPPING;
}
Unless I can define as many XXXFriendlyURLMapper as I want. Need to test.
Yea, I think I wasn't clear in my response. You should be able to create multiple XXXFriendlyURLMapper classes in one module. For an example, look at the document-library-web module.
Copyright © 2025 Liferay, Inc
• Privacy Policy
Powered by Liferay™