Currently I would like to have ability for copy layout content type from one site to another as draft. But it can't do that with the code below:
private void copyLayout(final Layout srclayout, Layout destLayout) throws Exception {
Layout destDraftLayout = LayoutLocalServiceUtil.fetchLayout(
PortalUtil.getClassNameId(Layout.class), destLayout.getPlid());
if (Validator.isNotNull(layout) && Validator.isNotNull(destLayout)) {
destDraftLayout = layoutCopyHelper.copyLayout(srclayout, destDraftLayout);
layoutLocalService.updateLayout(destDraftLayout);
}
The content always blank. Please help, I don't know how to solve this problem.
Above code working fine with the current site