Extending the Sitefinity Next.js Navigation Widget
Adding Custom Views and Logo Support
Search for content and press Enter to submit.
Adding Custom Views and Logo Support
Navigation is the backbone of any website - it's what guides your visitors through your content and helps them find what they're looking for. While Sitefinity's out-of-the-box navigation widget works great for basic scenarios, sometimes you need more control over the markup or want to add custom fields like a logo image to make your navigation truly shine.
Recently, a viewer on our YouTube channel asked exactly this question: "How can I extend the default navigation widget to add a custom view with full markup control and include an image field in the widget designer?" It's such a common need that we decided to turn our response into a comprehensive guide that could help the broader Sitefinity community.
In this article, we'll walk through the process step-by-step, showing you how to:
Let's dive in!

First, we need to extend the default navigation entity to include our custom logo field. This will add a new image selector to the widget designer, allowing content editors to easily add and manage navigation logos.
Create a file called extended-navigation.entity.ts:
Let's break down what's happening here:
NavigationEntity to get all the default navigation properties (like navigation selection, CSS classes, template selection, etc.)Logo property that can hold image content@Content decorator tells Sitefinity to create an image selector in the widget designerAllowMultipleItemsSelection: false restricts selection to a single logo imageMixedContentContext ensures proper TypeScript support for content selectionThis extended entity gives content editors all the familiar navigation configuration options, plus the new logo field that will appear in the widget designer.
Now let's create a custom navigation view that uses our extended entity and displays the logo alongside the navigation items. But first, let's understand how the default navigation works.
Before creating your custom view, it's helpful to understand how the default navigation widget works. The Sitefinity team has made the entire Next.js SDK available on GitHub, which means you can reference the default implementations as a starting point.
The default navigation widget views are located in the nextjs-sdk/widgets/navigation directory. For this tutorial, we'll use the horizontal.tsx view as our reference since it's the most commonly used navigation layout.
Looking at the default horizontal view gives you insights into:
This is incredibly valuable when you want to maintain similar functionality while customizing the markup to fit your specific design requirements.
Now, let's create our custom navigation view that incorporates the logo functionality. Create a new file called custom-navigation.view.tsx:
Key features of this custom view:
NavigationViewProps<ExtendedNavigationEntity> to get proper TypeScript support for our extended entityRestClient.getItemWithFallbackrenderNavigationItems function handles multi-level navigationIsCurrentlyOpened property to highlight current pagesFinally, we need to register both our custom view and extended entity so they're available in the Sitefinity page editor. In your widget-registry.ts file, add the following:
This registration does two important things:
Now when you edit any navigation widget in the Sitefinity page editor, you'll see:


Congratulations! We've successfully extended the Sitefinity Next.js navigation widget with:
This approach gives you the best of both worlds: the power of custom development combined with the ease of use that content editors expect. Since we replaced the default entity with our extended version, even the default navigation views will now have access to the Logo field, giving content editors maximum flexibility.

This is just the beginning! You could extend this further.
The beauty of Sitefinity's Next.js SDK is that it gives you the power to create exactly the navigation experience your project needs, while still maintaining the ease of use that content editors expect.
Have questions about extending other Sitefinity widgets? Reach out - we love helping the Sitefinity community build amazing digital experiences!