Details
-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
3.2.8
-
None
Description
Currently the slave page target homeTemplate has to have a depth <= 2 (LiveCopyUtils.getDecoupledTargets)
/** * Find the target for a new slave page in a LC site without a full LC structure. The localization is done via template type */ protected List<Node> getDecoupledTargets(Node siteRoot, String templateType) throws RepositoryException { List<Node> resultSet = new ArrayList<>(); Session websiteSession = MgnlContext.getJCRSession(RepositoryConstants.WEBSITE); QueryManager queryManager = websiteSession.getWorkspace().getQueryManager(); // Verify String query = "SELECT * from [mgnl:page] AS t WHERE ISDESCENDANTNODE('%s') AND [mgnl:template] = '%s'"; query = String.format(query, siteRoot.getPath(), templateType); NodeIterator nodes = queryManager.createQuery(query, Query.JCR_SQL2).execute().getNodes(); while (nodes.hasNext()) { Node node = (Node) nodes.next(); if (node.getDepth() <= 2) { resultSet.add(node); } } return resultSet; }
This improvement implements support for pageTrees where the homeTemplate has a higher depth (e.g. site/country/home),.
Checklists
Acceptance criteria
Attachments
Issue Links
- mentioned in
-
Page Loading...