(Opens New Window)
Mark as an Answer
Relating Layout and AssetEntries
August 22, 2012 2:09 PM
Rank: Junior Member
Join Date: July 20, 2012
I want to obtain all the AssetEntries that are contained in a certain Layout.
Is there a way of doing this?
I tried with the following DynamicQuery
DynamicQuery query= DynamicQueryFactoryUtil.forClass(AssetEntry.class, PortalClassLoaderUtil.getClassLoader());
List<AssetEntry> results = AssetEntryLocalServiceUtil.dynamicQuery(query);
I use the "groupId" in the query since is the only attribute in common with Layout and AssetEntry that I found.
The problem here is that the list "results" contains a lot of AssetEntries that are contained in other layouts.
Thanks in advance!
Sign in to vote.
Please sign in to flag this as inappropriate.