private function getView($route, $frontmatter, $key)
    {
        $view = [];

        // From meta frontmatter
        $meta = $this->getMetaForRoute($route);
        if (isset($meta[$key])) {
            $view = $meta[$key];
        }

        // From document frontmatter
        if (isset($frontmatter[$key])) {
            $view = array_merge_recursive_distinct($view, $frontmatter[$key]);
            //$view = array_merge($view, $frontmatter[$key]);
        }

        return $view;
    }
private function getView($route, $frontmatter, $key)
    {
        $view = [];

        // From meta frontmatter
        $meta = $this->getMetaForRoute($route);
        if (isset($meta[$key])) {
            $view = $meta[$key];
        }

        // From document frontmatter
        if (isset($frontmatter[$key])) {
            $view = array_merge_recursive_distinct($view, $frontmatter[$key]);
            //$view = array_merge($view, $frontmatter[$key]);
        }

        return $view;
    }
private function getView ( $ route , $ frontmatter , $ key ) { $ view = [ ] ; // From meta frontmatter $ meta = $ this -> getMetaForRoute ( $ route ) ; if ( isset ( $ meta [ $ key ] ) ) { $ view = $ meta [ $ key ] ; } // From document frontmatter if ( isset ( $ frontmatter [ $ key ] ) ) { $ view = array_merge_recursive_distinct ( $ view , $ frontmatter [ $ key ] ) ; //$view = array_merge($view, $frontmatter[$key]); } return $ view ; }
Get view by mergin information from meta and frontmatter.

@param string $route       current route used to access page.
@param array  $frontmatter for the content.
@param string $key         for the view to retrive.

@return array with data to add as view.
Get view by mergin information from meta and frontmatter .