@ConsumerType
public interface SiteRootSelectionStrategy
A site root is the Page
that is the common ancestor of all Page
s that belong to a single site. In a single-country
setup this is the parent of all language roots. For a multi-country setup it may be different, depending on the content structure.
A default implementation is available called DefaultSiteRootSelectionStrategy. To override it an implementation must be registered
with a service ranking greater then 0. Implementations may fall back to the DefaultSiteRootSelectionStrategy. If they are not able to
return a site root for a given Page
the LanguageAlternativesService
cannot return any language alternatives.
Modifier and Type | Method and Description |
---|---|
@Nullable Page |
getSiteRoot(@NotNull Page page)
|
int |
getStructuralDepth(@NotNull Page page)
Returns the depth of the content structure managed under the site root.
|
int getStructuralDepth(@NotNull @NotNull Page page)
This defines the number of levels the LanguageAlternativesService
traverses to collect language roots.
Examples:
/content/site
as site root and /content/site/en
as language root the structural depth is 1
/content/site
as site root, an intermediate level and a language root at /content/site/us/en
, the
structural depth is 2
/content/site
as site root, multiple intermediate levels and a language root at
/content/site/emea/europe/germany/de
the structural depth is 4
page
- a Page
within a siteint
greater or equal to oneCopyright © 2010 - 2023 Adobe. All Rights Reserved