Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Tree View Implementation

  Asked By: Jameson    Date: Jan 09    Category: Sharepoint    Views: 1252

I have written an application using obout_ASPTreeView_2_NET.dll from http://www.asptreeview.com/t2/download.aspx The app displays a treeview of all the team sites on our portal and when the tree nodes expand then all of the 'lists' on that team site are listed with hyperlinks that open the selected list in a new window.

I perform a test to prevent any galleries from being nodes of the tree by filtering out nay URLs that contain "/_catalogs/" and this works great. The problem I have is trying to get the actual site Title to display. Currently, I am looping through the sites in the siteCollction and using the
parsing site.ServerRelativeUrl to get the directory name; e.g., http://[portal servername]/sites/Team1 becomess Team1 on the tree. I then use a select case to display the actual team site title; e.g., instead of Team1 the tree shows Software Development. The problem is that this requires hard coding Case conditions for existing sites and will not work when new sites are added.

How can I get the Title for the team site from the Webs table? Is there something in the object model I can use?



2 Answers Found

Answer #1    Answered By: Matt Prince     Answered On: Jan 09

I am not sure what you mean from the webs  table.

But if you are using the SharePoint OM then the title  property from your SPWeb object  should return the sites  title.

Answer #2    Answered By: Brooks Bond     Answered On: Jan 09

That did the trick.

Dim myWeb2 As SPWeb

For Each siteCollection In siteCollections

myWeb2 = siteCollection.AllWebs("")

siteName = myWeb2.Title

Didn't find what you were looking for? Find more on Tree View Implementation Or get search suggestion and latest updates.