- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
Public Overrides Sub OnViewInitialized()
Dim userId As String = _guard.GetCurrentUserId()
BindGroups()
Bind()
DoHackyStuff()
End Sub
Private Function GetUrls() As Dictionary(Of String, String)
Dim dic As New Dictionary(Of String, String)
For Each assembly In AppDomain.CurrentDomain.GetAssemblies()
For Each type In assembly.GetTypes.Where(Function(q) q.FullName.EndsWith("Url"))
Dim url = CType(_container.GetByType(type), IUrl).Page
Dim name = type.FullName.Split(".".ToCharArray)
dic.Add(url, name.Reverse.First + ", " + name.Reverse.Skip(1).First)
Next
Next
Return dic
End Function
Private Sub DoHackyStuff()
Dim siteMap = _container.Get(Of ISiteMapGenerator)().GetSiteMap()
Dim urls = GetUrls()
Dim sb As New StringBuilder
For Each top In siteMap.Nodes
sb.AppendLine(String.Format("<top display-name=""{0}"" id=""{1}"">", top.Name, urls(top.Url)))
For Each group In top.Nodes
sb.AppendLine(String.Format("<group display-name=""{0}"">", group.Name))
For Each item1 In group.Nodes
sb.AppendLine(String.Format("<item display-name=""{0}"" id=""{1}""/>", item1.Name, urls(item1.Url)))
Next
sb.Append("</group>")
Next
sb.Append("</top>")
Next
End Sub
guest 30.08.2009 16:14 # 0
guest 24.11.2009 19:47 # 0
group.Name="""блабла"""
- будет вам подарок.