Sdl.Web.Tridion/Providers/Navigation/CILImpl/DynamicNavigationProvider.cs
/// <summary>
/// Gets Navigation Links for the context navigation panel for the given request URL path.
/// </summary>
/// <param name="requestUrlPath">The request URL path.</param>
/// <param name="localization">The Localization.</param>
/// <returns>The Navigation Links.</returns>
Gets Navigation Links for the context navigation panel for the given request URL path.
Gets Navigation Links for the context navigation panel for the given request URL path .
public virtual NavigationLinks GetContextNavigationLinks(string requestUrlPath, ILocalization localization)
        {
            using (new Tracer(requestUrlPath, localization))
            {
                SitemapItem navModel = GetNavigationModel(localization);
                if (!(navModel is TaxonomyNode))
                {
                    return _fallbackNavigationProvider.GetContextNavigationLinks(requestUrlPath, localization);
                }
                SitemapItem contextNode = navModel.FindSitemapItem(requestUrlPath.NormalizePageUrlPath());
                if (contextNode != null && !(contextNode is TaxonomyNode))
                {
                    contextNode = contextNode.Parent;
                }
                List<Link> links = new List<Link>();
                if (contextNode != null)
                {
                    links.AddRange(contextNode.Items.Where(i => i.Visible).Select(i => i.CreateLink(localization)));
                }
                return new NavigationLinks
                {
                    Items = links
                };
            }
        }
public virtual NavigationLinks GetContextNavigationLinks ( string requestUrlPath , ILocalization localization ) { using ( new Tracer ( requestUrlPath , localization ) ) { SitemapItem navModel = GetNavigationModel ( localization ) ; if ( ! ( navModel is TaxonomyNode ) ) { return _fallbackNavigationProvider . GetContextNavigationLinks ( requestUrlPath , localization ) ; } SitemapItem contextNode = navModel . FindSitemapItem ( requestUrlPath . NormalizePageUrlPath ( ) ) ; if ( contextNode != null && ! ( contextNode is TaxonomyNode ) ) { contextNode = contextNode . Parent ; } List < Link > links = new List < Link > ( ) ; if ( contextNode != null ) { links . AddRange ( contextNode . Items . Where ( i => i . Visible ) . Select ( i => i . CreateLink ( localization ) ) ) ; } return new NavigationLinks { Items = links } ; } }
Gets Navigation Links for the context navigation panel for the given request URL path.
Gets Navigation Links for the context navigation panel for the given request URL path .
// No Navigation Taxonomy found in this Localization; fallback to the StaticNavigationProvider.
The Navigation Links.
The Navigation Links .
requestUrlPath
string
The request URL path.
The request URL path .
localization
ILocalization
None