Deliver superior customer experiences with an AI-driven platform for creating and deploying cognitive chatbots
Deliver Awesome UI with the most complete toolboxes for .NET, Web and Mobile development
Automate UI, load and performance testing for web, desktop and mobile
A complete cloud platform for an app or your entire digital business
Detect and predict anomalies by automating machine learning to achieve higher asset uptime and maximized yield
Automate decision processes with a no-code business rules engine
Optimize data integration with high-performance connectivity
Connect to any cloud or on-premises data source using a standard interface
Build engaging multi-channel web and digital experiences with intuitive web content management
Personalize and optimize the customer experience across digital touchpoints
Build, protect and deploy apps across any platform and mobile device
Rapidly develop, manage and deploy business apps, delivered as SaaS in the cloud
The content you're reading is getting on in years
This post is on the older side and its content may be out of date.
Be sure to visit our blogs homepage for our latest news, updates and information.
Making a dynamic navigation that incorporates product offerings, content or specials can drastically improve the end user experience. This blog post explains a technique that allows you to extend the navigation to include any type of content.
Currently Sitefinity can display only items of type PageNode (i.e. Pages) in the out of the box Navigation controls.
In order to display dynamic content, you would need custom navigation control, which will be bound to the SitefinitySiteMapDataSource - our control that provides a cached data source of the pages sitemap. You can subscribe to the navigation control's ItemDataBound event, and insert new items under the desired page, by using the Sitefinity API to retrieve a collection of the content items of the desired type.
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MixedNavigation.ascx.cs" Inherits="SitefinityWebApp.SupportSamples.MixedNavigation" %>
<%@ Register TagPrefix="sfNav" Namespace="Telerik.Sitefinity.Web.UI.NavigationControls" Assembly="Telerik.Sitefinity" %>
and its code-behind logic:
MixedNavigation : System.Web.UI.UserControl
sender, EventArgs e)
//Subscribe to ItemDataBound so you can insert new items under desired node on data binding
rmNavigation.ItemDataBound += rmNavigation_ItemDataBound;
sender, Telerik.Web.UI.RadMenuEventArgs e)
var page = e.Item.DataItem
//Check if the current item is the desired PageNode
(page.Title == ParentPageToPlaceUnder)
//Get the collection of items
var manager = CatalogManager.GetManager();
var products = manager.GetProducts()
.Where(p => p.Status == Telerik.Sitefinity.GenericContent.Model.ContentLifecycleStatus.Live && p.visible == true)
//Get the ContentLocationService - it stores the URL statistics for all Sitefinity data items
var contLocationService = SystemManager.GetContentLocationService();
//Get the current culture, to ensure you're resolving the correct URL
var culture = CultureInfo.CurrentUICulture;
//iterate through the collection and add a new item in the navigation with the item's Title and resolved URL
var itemAbsoluteUrl =
//Please ensure your items are displayed at least on one page in the site, otherwise GetItemDefaultLocation() will be null
//You can get a list of the generated item locations by going to:
//Sitefinity backend -> Content -> Your desired content type -> Pages where items of your content type are published
(contLocationService.GetItemDefaultLocation(product, culture) !=
itemAbsoluteUrl = contLocationService.GetItemDefaultLocation(product).ItemAbsoluteUrl;
//You can configure the desired page to insert the new items under - it will be displayed as a public property int he widget property editor as well
.parentPageToPlaceUnder = value;
//you can configure a default page to insert the new items under
For your convenience I've attached the full sample to this blog post here, please feel free to modify it as per your specific requirements. You can also find here a short demonstrative video of the sample used on a Sitefinity page.
You can also consider assigning related products or other data directly to pages through custom fields for pages, which will allow your business users to define exactly what custom dynamic content will appear in the mega menu. You can review the documentation for querying custom fields for pages to find out what API methods to use.
View all posts from Vassil Vassilev on the Progress blog. Connect with us about all things application development and deployment, data integration and digital business.
Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.
Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.