Layout Template has no effect on Duplication Navigation cont

Posted by Community Admin on 04-Aug-2018 10:40

Layout Template has no effect on Duplication Navigation control in Toolboxes

All Replies

Posted by Community Admin on 08-Feb-2012 00:00

Hi there,

I have a duplicate navigation control that must be used on various pages, but it has to also make use of a custom layout which is done in a separate ascx control.

If I manually add a normal navigation control to page and edit it's custom layout property, it works and applies the custom template, but...

If I go to Administration > Settings > Advanced > Toolboxes > Page Controls > Sections > NavigationControlSection > Tools and I make a copy of the original navigation control and in the new copy I apply the same path to the custom layout, it doesn't work.

The description for this field in the Administration section says the following: "Specifies the name of an embedded layout template or the path to an external (.ascx) template."
So it sounds like it should do what I expect, but when I drop the new control (which uses the same type as the original Navigation control) onto a page, it doesn't adopt the custom layout.

Why would that be?


Posted by Community Admin on 10-Feb-2012 00:00

Hello Jacques,

Thank you for contacting us.

If you'd like to use your navigation template as a separate navigation control, you would have to add a SiteMapDataSource to it and then register it Administration > Settings > Advanced > Toolboxes > Page Controls > Sections > NavigationControlsSection. and in Control CLR Type or Virtual Path specify the relative path to your custom navigation. Please take a look at the sample below to see hot to configure the SiteMapDataSource. In order for your navigation to display Sitefinity pages, you need to use SitefinitySiteMapDataSource:

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="CustomNavigationControl.ascx.cs" Inherits="SitefinityWebApp.CustomNavigationControl" %>
<%@ Register Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI.NavigationControls" TagPrefix="navcontrols" %>
<navcontrols:SitefinitySiteMapDataSource ID="SiteMapDataSource" runat="server" ShowStartingNode="false" />
<telerik:RadMenu runat="server" ID="MyMenu" DataSourceID="SiteMapDataSource"></telerik:RadMenu>

Hope you find this information useful.

Kind regards,
Jen Peleva
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed