Displaying Sibling links if no Children present
Hi,
I am trying to edit the Navigation template to show the sibling links when no child nodes are present.i have tried the below code but getting error- Cannot
convert type 'System.Web.SiteMapNodeCollection' to
'Telerik.Sitefinity.Web.UI.NavigationControls.SitefinitySiteMapDataSource'
Please help me know the alternative solution to bind child nodes in navigation container, if child nodes are not present then should bind the siblings
<navigation:NavigationContainer runat="server" DataSourceID="dataSource">
<Templates>
<navigation:NavigationTemplate runat="server">
<Template>
<li>
<navigation:NavigationContainer ID="NavigationContainer1" runat="server" DataSource='<%# ((SiteMapNode) Container.DataItem).ChildNodes %>'>
<Templates>
<navigation:NavigationTemplate ID="NavigationTemplate1" runat="server">
<Template>
<li>
<a id="A1" runat="server" href='<%# NavigationUtilities.ResolveUrl(Container.DataItem) %>' target='<%# NavigationUtilities.GetLinkTarget(Container.DataItem) %>'><%# Eval("PageTitle") %></a>
</li>
</Template>
<SelectedTemplate>
<li class="active">
<a id="A2" runat="server" href='<%# NavigationUtilities.ResolveUrl(Container.DataItem) %>' class="active" target='<%# NavigationUtilities.GetLinkTarget(Container.DataItem) %>'><%# Eval("PageTitle") %></a>
</li>
</SelectedTemplate>
</navigation:NavigationTemplate>
</Templates>
</navigation:NavigationContainer>
</li>
</Template>
<SelectedTemplate>
</SelectedTemplate>
</navigation:NavigationTemplate>
</Templates>
</navigation:NavigationContainer>
Thanks,
Arun