alp0001 Posted February 26, 2006 Posted February 26, 2006 Greetings, I'm starting to play around in asp.net once again using the Personal Web Site Starter Kit. In the Default.master page, I have a menu control being created using a datasourceid property set to a sitemapdatasource control: <asp:menu id="menub" runat="server" datasourceid="SiteMapDataSource1" cssclass="menub" orientation="Horizontal" maximumdynamicdisplaylevels="0" skiplinktext="" staticdisplaylevels="2" /> <asp:sitemapdatasource id="SiteMapDataSource1" runat="server" startingnodeoffset="0" /> I'm also using a SiteMapPath control in the same master page: <asp:SiteMapPath id="SiteMapPath1" runat="Server" PathSeparator=" > " RenderCurrentNodeAsLink="false" /> What I would like to do is somehow override the menu/sitemapdatasource controls so that it skips one of the entries in the web.sitemap file. However, I would like to leave the entry in the web.sitemap file for the SiteMapPath control to show the value. Any idea where to begin? :confused: Quote My name in binary (from ASCII): 01000001011001000110000101101101 010100000110010101110100011100100110100101100101
Administrators PlausiblyDamp Posted February 27, 2006 Administrators Posted February 27, 2006 What reason are you looking at skipping over the entry? Is this security related? If so then siteMaps have built in support for removing entries that are not accessibly for a given user anyway. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
alp0001 Posted February 27, 2006 Author Posted February 27, 2006 No, not security related. I just don't want the link (maybe others in the future) to be included in the menu creation. If I were to include the link in the web.sitemap file, the page would look like the following: top menu: link1 link2 link3 OnlyShowCurLocationlink Current location: Homelink > OnlyShowCurLocationlink bottom menu: link1 link2 link3 OnlyShowCurLocationlink However, I want it to look like this: top menu: link1 link2 link3 Current location: Homelink > OnlyShowCurLocationlink bottom menu: link1 link2 link3 If I can't override the creation, is it possible to have two web.sitemap files (one for the SiteMapPath control and one for the menu control)? I would prefer not having to do this, as I would need to maintain two files... Quote My name in binary (from ASCII): 01000001011001000110000101101101 010100000110010101110100011100100110100101100101
alp0001 Posted March 2, 2006 Author Posted March 2, 2006 As a temporary workaround, I'm going to leave the link out of the web.sitemap file and create an absoultely positioned DIV with the hard-coded path for the page in question. Maybe when I become more proficent in .net capabilities, I can see how to overcome this .net control problem. I'm rather suprised that no one here knows of a way... Quote My name in binary (from ASCII): 01000001011001000110000101101101 010100000110010101110100011100100110100101100101
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.