0

I've created a Blog Display Page Template, and marked it as default. Now, from inside a Fragment that has a BlogEntry object, a want to get its Display Page friendly URL.

Marcos Blandim
  • 293
  • 1
  • 8

1 Answers1

0

You can use the getFriendlyURL method from AssetDisplayPageFriendlyURLProvider

[#assign
  assetDisplayPageFriendlyURLProvider = serviceLocator.findService("com.liferay.asset.display.page.portlet.AssetDisplayPageFriendlyURLProvider")
  friendlyURL = assetDisplayPageFriendlyURLProvider.getFriendlyURL(assetEntry.getClassName(), assetEntry.getClassPK(), themeDisplay)
/]
${friendlyURL }
Marcos Blandim
  • 293
  • 1
  • 8