Last active
December 29, 2015 08:29
-
-
Save CorneAussems/7643615 to your computer and use it in GitHub Desktop.
Liferay Groovy Script: find specific Journal Article's layout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.liferay.portlet.journal.service.JournalContentSearchLocalServiceUtil | |
import com.liferay.portal.service.LayoutLocalServiceUtil | |
groupid = new Long(17364) | |
truefalse = Boolean.TRUE | |
articleId= "1209617" | |
println(groupid +","+truefalse +","+ articleId) | |
articlesfound = JournalContentSearchLocalServiceUtil.getLayoutIdsCount(articleId ); | |
println("articlesfound:"+articlesfound) | |
hitLayoutList = JournalContentSearchLocalServiceUtil.getLayoutIds(groupid, truefalse,articleId ); | |
println(hitLayoutList.size()+" "+hitLayoutList) | |
for ( Long hitLayoutId : hitLayoutList){ | |
println("hitLayoutId="+hitLayoutId) | |
layout = LayoutLocalServiceUtil.getLayout(groupid, truefalse, hitLayoutId.longValue()); | |
println(layout) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment