Do you face any problem to the top navigation link where you have added a custom link but end up it return you node and however you click and it gonna redirect you back to your root site… irony?
Please check if you are using this format? This is no problem when you are in SP2007, but SP2010 you will understand what i mean.
<SharePoint:AspMenu
ID="TopNavigationMenuV4"
Runat="server"
EnableViewState="false"
DataSourceID="topSiteMap"
AccessKey="<%$Resources:wss,navigation_accesskey%>"
Orientation="Horizontal"
StaticDisplayLevels="2"
StaticSelectedStyle-CssClass="xxxx"
MaximumDynamicDisplayLevels="1"
SkipLinkText=""
StaticEnableDefaultPopOutImage="False"
CssClass="atq-topnav">
<DynamicMenuStyle CssClass="xxx" />
<DynamicMenuItemStyle CssClass="xxx" />
<DynamicHoverStyle CssClass="xxx"/>
<StaticItemTemplate>
<table cellpadding="0" cellspacing="0">
<tr>
<td>
<asp:HyperLink runat="Server" ID="LinkMenuItem" NavigateUrl='<%# Eval("DataPath")%>' Text='<%# Eval("Text")%>' /></td>
</tr>
</table>
</StaticItemTemplate>
</SharePoint:AspMenu>VS.
Change the syntax as follow and you will able to solve the “unreachable” link issue.
<SharePoint:AspMenu
ID="TopNavigationMenuV4"
Runat="server"
EnableViewState="false"
DataSourceID="topSiteMap"
AccessKey="<%$Resources:wss,navigation_accesskey%>"
Orientation="Horizontal"
StaticDisplayLevels="2"
StaticSelectedStyle-CssClass="xxx"
MaximumDynamicDisplayLevels="1"
SkipLinkText=""
CssClass="s4-tn">
<StaticItemTemplate>
<table onclick="window.location=this.parentNode.href" cellpadding="0" cellspacing="0">
<tr>
<td>
<asp:Label runat="server" id="a1" text='<%# Eval("Text")%>'></asp:Label>
</td>
</tr>
</table>
</StaticItemTemplate>
</SharePoint:AspMenu>
Search This Blog
Friday, December 17, 2010
[Troubleshooting] SharePoint 2010 MasterPage Custom Top Navigation Issue
[Tutorial] SharePoint DataView WebPart Recursive Item DataSource
Create a DataVIew WebPart page by following guide :
1. Go to the SharePoint Site using SharePoint Designer.
2. Create a ASPX page
a. File > New > ASPX > OK
3. Inherit the MasterPage
a. Format > MasterPage > Attach Master Page … > custom Masterpage > /_catalogs/masterpage/xxx.master
4. Create on the arrow on the maincontent placeholder > Create Custom Content
5. Add WebPart Zone
a. Insert > SharepointControl > WebpartZone
6. Add Data View Webpart
a. Insert > SharepointControl > DataView
7. Drag “ListName” List to the DataView WebPart
8. Do Styling and Filtering Accordingly.
b. These lists contain folder, in order achieve to see the file only, the scope need to be defined as Recursive. To do that, just click on the current Data Source: on the position top right, and then select Recursive from Item and folder scope. Please apply this for both history and history details page in this case.
c. For the first field please custom it as <a href="<DetailsPage>.aspx?ItemId={@ID}"><xsl:value-of select="@Title" /></a> in your code behind.
d. Set the filter to only Created by equal to [Current User].
9. Now repeat step 1 to step 8 to create history detail page, note that the layout and column display is different.
10. Add a parameter to the DataView Webpart.
11. Set Filter ID field equal to [ItemId]
12. Save it and test on it.
14. Happy Coding !