In SP2010 publishing website, I have added the Description column in Pages library.
After that I created the menu with following code:
<PublishingNavigation:PortalSiteMapDataSource
ID="SiteMapDS"
runat="server"
EnableViewState="false"
SiteMapProvider="CurrentNavigation"
StartFromCurrentNode="true"
StartingNodeOffset="1"
ShowStartingNode="false"
TrimNonCurrentTypes="Heading"
/>
<SharePoint:AspMenu
ID="CurrentNav"
runat="server"
EnableViewState="false"
DataSourceID="SiteMapDS"
UseSeparateCSS="false"
UseSimpleRendering="true"
Orientation="Horizontal"
StaticDisplayLevels="1"
MaximumDynamicDisplayLevels="1"
CssClass="nightanday-menu"
SkipLinkText="<%$Resources:cms,masterpages_skiplinktext%>"
/>
It renders the menu like:
BaseItem1 BaseItem2 BaseItem3
Item1A Item2A Item3A
Item1B Item2B Item3B
I am trying to fetch the description of each link and display it under the child items, something like:
BaseItem1 BaseItem2 BaseItem3
Item1A Item2A Item3A
a little description of 1A a little description of 2A a little description of 3A
Item1B Item2B Item3B
a little description of 1B a little description of 2B a little description of 3B
I tried something like:
<SharePoint:AspMenu
ID="CurrentNav"
runat="server"
EnableViewState="false"
DataSourceID="SiteMapDS"
UseSeparateCSS="false"
UseSimpleRendering="true"
Orientation="Horizontal"
StaticDisplayLevels="1"
MaximumDynamicDisplayLevels="1"
CssClass="nightanday-menu"
SkipLinkText="<%$Resources:cms,masterpages_skiplinktext%>">
<DynamicItemTemplate>
<a href="<%#Eval('URL')%>"><%#Eval('Title')%></a>
<br/>
<small><%#Eval('Description')%></small>
</DynamicItemTemplate>
</SharePoint:AspMenu>
But Eval(..) doesn't work here.
Is there a way to do it without making a custom webpart for the menu?
OR
Can I make changes to the DataSource and include Description column to it?