473,385 Members | 1,829 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

SiteMap.Provider.CurrentNode.Title

In my Title and Description web.sitmap file I use:

3255|Home
5434|Support
5342|Contact

etc in the Title and Description properties. The number represents a phrase
lookup ID in a function that returns a translated word in French, German
etc.

The following works to amend all SiteMap Node titles in memory.

Function fSetMenuItems() As Boolean

Dim siteNodes As SiteMapNodeCollection
siteNodes = SiteMap.RootNode.GetAllNodes()
Dim s As SiteMapNode

For Each s In siteNodes
SiteMap.Provider.CurrentNode.ReadOnly = False
s.ReadOnly = False
s.Title = fGetLanguageIDValue(Val(Left(s.Title,4)),
strCurrentLanguageCode) 'Return the translated word
Next

End Function
After I have changed to French however and want to go to German, I need to
know the original XML values of the Title and Description so I can run
fSetMenuItems again.

How can I get them?

Sep 21 '08 #1
1 2023
Never mind -- I just used a custom Site Node attribute to store the ID's.

"Mark B" <no*****@none.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
In my Title and Description web.sitmap file I use:

3255|Home
5434|Support
5342|Contact

etc in the Title and Description properties. The number represents a
phrase lookup ID in a function that returns a translated word in French,
German etc.

The following works to amend all SiteMap Node titles in memory.

Function fSetMenuItems() As Boolean

Dim siteNodes As SiteMapNodeCollection
siteNodes = SiteMap.RootNode.GetAllNodes()
Dim s As SiteMapNode

For Each s In siteNodes
SiteMap.Provider.CurrentNode.ReadOnly = False
s.ReadOnly = False
s.Title = fGetLanguageIDValue(Val(Left(s.Title,4)),
strCurrentLanguageCode) 'Return the translated word
Next

End Function
After I have changed to French however and want to go to German, I need to
know the original XML values of the Title and Description so I can run
fSetMenuItems again.

How can I get them?
Sep 21 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: chris.rust | last post by:
Has anyone else had any trouble setting up a sitemap view to be filtered by roles? We've put a cust role provider in place, and we can verify that it's only being called once for each...
1
by: Richard Carpenter | last post by:
I am trying to dynamically set the page title in the form load event of my master page, but the CurrentNode property doesn't seem to be available for some reason in the following code, the SiteMap...
1
by: AmitKu | last post by:
Here is my situation. I have two sitemaps registered, A and B, where A is used by my default provider. When I do Sitemap.CurrentNode it operates w/ respect to the default provider. However, I...
0
by: dirk | last post by:
I am writing a custom control (code see below) and I am getting an exception that drives me crazy. When I drag my control on a form, Visual Studio shows immediately the following exception: ...
0
by: dirk | last post by:
I am writing a custom control (code see below) and I am getting an exception that drives me crazy. When I drag my control on a form, Visual Studio shows immediately the following exception: ...
5
by: Tim Mackey | last post by:
hi, i have put my web.sitemap in /App_Data so i can edit it programatically via a web admin page, inheriting the modify permissions from the App_Data folder etc. i was hoping the provider would...
1
JamieHowarth0
by: JamieHowarth0 | last post by:
Hi guys, So the ever-lasting problem has remained until now - how to create a dynamic sitemap from information stored in a database. Microsoft's MSDN magazine covered how to do this using a...
0
by: Mark | last post by:
here's what i've got so far in my code beind if (SiteMap.CurrentNode != null) { if (SiteMap.CurrentNode != null) { strMetaKeywords = SiteMap.CurrentNode; strMetaDescription =...
0
by: Andy B | last post by:
I am using the default XML provider for the sitemap. I need the sitemap to display in different lists seperated based on node. Here is an example sitemap that I have. in web.sitemap (the list of...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.