Hi All,
Many time we use webcontent OOTB functionality for our solution. for that we also use Structure/Template. here Template is render part of WebContent. so many time developer stuck with how to get value of some important properties like theme-dispaly,scopegroupid,image path, etc. so, here give some instruction for that.
1) to get instance of class (some times we can't get accesss class by serviceLocator.findService())
$portal.getClass().forName("com.liferay.portlet.dynamicdatamapping.storage.StorageEngineUtil").newInstance()
2)currentScopegroupid
- $getterUtil.getLong($request.get("theme-display").get("scope-group-id"))
- $request.theme-display.scope-group-id
3) images path in theme
$request.get("theme-display").path-theme-images
4) themeDispaly
$request.theme-display
5) globalScopeGroupId
$groupId
5) find service
$serviceLocator.findService("com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService")
Enjoy!!!
Many time we use webcontent OOTB functionality for our solution. for that we also use Structure/Template. here Template is render part of WebContent. so many time developer stuck with how to get value of some important properties like theme-dispaly,scopegroupid,image path, etc. so, here give some instruction for that.
1) to get instance of class (some times we can't get accesss class by serviceLocator.findService())
$portal.getClass().forName("com.liferay.portlet.dynamicdatamapping.storage.StorageEngineUtil").newInstance()
2)currentScopegroupid
- $getterUtil.getLong($request.get("theme-display").get("scope-group-id"))
- $request.theme-display.scope-group-id
3) images path in theme
$request.get("theme-display").path-theme-images
4) themeDispaly
$request.theme-display
5) globalScopeGroupId
$groupId
5) find service
$serviceLocator.findService("com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService")
Enjoy!!!
No comments:
Post a Comment