CodeVerge.Net Beta


   Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: Date Entered: 1/4/2006 7:31:40 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 2 Views: 48 Favorited: 0 Favorite
3 Items, 1 Pages 1 |< << Go >> >|
"Andles" <>
NewsGroup User
getting page titles from sitemap1/4/2006 7:31:40 AM

0

So, I am using the following in my master page page_load event:

if (SiteMap.CurrentNode != null)

{

Page.Header.Title = SiteMap.CurrentNode.Title;

lblpageTitle.Text = SiteMap.CurrentNode.Description;

}

I run into problems here on pages that are not in the sitemap - such as detail pages that should not be navigated to directly (as they need the previous page query param to be of any use)

What do i do here - I can't seem to put them in the sitemap and yet make them not appear in the nav controls? Do I need to to add an else clause to my above code and then use a passed query param on the detail page to grab the title from the previous page?

Any help here appreciated as I am jut not sure if I am missing something quite obviouls to other folk?

Cheers,
Andles.

"dannychen" <>
NewsGroup User
Re: getting page titles from sitemap1/4/2006 11:25:49 PM

0

Well, one option is to simply not put them in the same hierarchy as your standard nodes. 

Aside from that, it would not be very difficult to add a custom "visible=false" attribute to each node that shouldn't be visibile.  Then in a SiteMapResolve handler you can walk up the parent nodes from the current nodes and unlink those nodes that shouldn't be visible. 

For Menu/TreeView kinds of controls, you would need to add custom binding code that removes those nodes.  It's trickier in this situation because you have to make sure to add the child nodes to the parent's child nodes collection.

--
Danny


disclaimer: Information provided is 'as is' and conveys no warranties or guarantees.
"Andles" <>
NewsGroup User
Re: getting page titles from sitemap1/5/2006 10:34:07 AM

0

>>Aside from that, it would not be very difficult to add a custom "visible=false" attribute to each node that shouldn't be visibile.  Then in a SiteMapResolve handler you can walk up the parent nodes from the current nodes and unlink those nodes that shouldn't be visible. 

 

Yep, did the trick just fine. Cheers.

3 Items, 1 Pages 1 |< << Go >> >|


Free Download:













asp.net 2.0 treeview autopostback problem

how to access the menuitem through javascript

horizontal menu text alignment

msdn type page

convert webpage to an image?

how do i style treeview control?

sitemapresolve

error: input string was not in a correct format

master page .. website embed

css style not being applied

sitemap page

menuitem will not select

caching masterpages and use of ~/ in reference to masterpagefile?

is the coupling between master page and theme too tight?

apply theme in design view in vs2005/ide

how to access a css class's attribute's value into a string variable in aspx.cs page

preinit in usercontrol

onmenuitemclick causing postback all the time

publish website option when using master pages

how to pick and choose which menu will show in treeview?

bind selected values

communicating between master page and child(x3) page

menu control : removing that annoying little arrow

menuitem and securitytrimming

can i hide the expand / collapse image of asp.net treeview control?

menu fixed at the top when scrolling down?

tab control ?

search buttons on master pages

can a usercontrol use a masterpage? why not?

help with the treeview...

multiple page layouts with same data/code

sitemapprovider - 'no parameterless constructor'

fixed header on grid layed on absolute div

how can i get different images on my web.sitemap masterpage

how to: expand tree to selectednode

a treeview in masterpage that display folders

render aspx form from database record

reorder treeview items

simple masterpage background image question

themes builder / themes where to find them

how to load other page inside updatepanel?

an error accuted when i use the treeview to display the content of a directory.

nested masterpage problem

treeview treeview1_treenodecheckchanged event handler not firing

setting menu static and dynamic menus to be the same width

using session from master page in content page

how can i change the currentsitemapnode title ?

dynamic loading of themes

treeview to display directory structure

referencing control on masterpage

   
  Privacy | Contact Us
All Times Are GMT