Tag Archives: structure

Play With Structure/Template In Liferay


Hi All, When we are creating a structure for a webcontent with some name, then some time we require to get structureId of that structure programmatically. Below is the sample code for that: private String getStructureId() { String STRUCTUREID = null; try { DynamicQuery dynamicQuery = DynamicQueryFactoryUtil.forClass(JournalStructure.class, PortalClassLoaderUtil.getClassLoader()).add(PropertyFactoryUtil. forName(“name”).like(“%YOUR_STRUCTURE_NAME_HERE%”)); List structures = JournalStructureLocalServiceUtil.dynamicQuery(dynamicQuery, 0, 1); […]

https://writetomevishal.wordpress.com/2014/10/28/play-with-structuretemplate/