Interface NavTreeBuilder

  • All Known Implementing Classes:
    NavTreeBuilderImpl

    public interface NavTreeBuilder
    Creates navigation trees that facilitate the rendering of navigation.
    Author:
    avasquez
    • Method Detail

      • getNavTree

        NavItem getNavTree​(String url,
                           int depth,
                           String currentPageUrl)
        Returns the navigation tree with the specified depth for the specified store URL.
        Parameters:
        url - the root folder of the tree
        depth - the depth of the tree
        currentPageUrl - the URL of the current page (used to determine the active URLs).
        Returns:
        the navigation tree
      • getNavTree

        NavItem getNavTree​(String url,
                           int depth,
                           String currentPageUrl,
                           org.craftercms.commons.converters.Converter<SiteItem,​NavItem> itemConverter)
        Returns the navigation tree with the specified depth for the specified store URL.
        Parameters:
        url - the root folder of the tree
        depth - the depth of the tree
        currentPageUrl - the URL of the current page (used to determine the active URLs).
        itemConverter - the converter that should be used to convert from SiteItems to the actual NavItems
        Returns:
        the navigation tree