log.debug("PageLayoutComponentImpl.newSiblingDynamicPage() invoked");
try
{
// retrieve current page or template and parent folder from page manager
ContentPageImpl contentPageImpl = (ContentPageImpl)contentPage;
BaseFragmentsElement pageOrTemplate = getPageOrTemplate(contentPageImpl.getPageOrTemplate().getPath());
BasePageElement page = ((pageOrTemplate instanceof BasePageElement) ? (BasePageElement)pageOrTemplate : null);
Folder folder = (Folder)pageOrTemplate.getParent();
// check for edit permission
folder.checkAccess(JetspeedActions.EDIT);
// construct new sibling dynamic page