Re: Development Question: How to tell if SPWeb is a Document WorkSpace?
From: Jim Duncan (jim_at_collutions.spam)
Date: 08/27/04
- Next message: rep: "neddddddddd heeelp ----- assembly strong name"
- Previous message: Gordy Reid: "Re: Customizing sharepoint site"
- In reply to: Jim Duncan: "Re: Development Question: How to tell if SPWeb is a Document WorkSpace?"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 27 Aug 2004 11:24:20 -0700
As promised (though late):
Private Function parseSPWeb(ByVal webCollection As
Microsoft.SharePoint.SPWeb) As String
Dim subSite As SPWeb
Dim str, meetingSpaceStr, documentSpaceStr, subWebStr As String
For Each subSite In webCollection.Webs
Dim subSiteHTML
subSiteHTML = " *" _
& "<a target = 'blank' href ='" _
& subSite.Url _
& "'>" _
& subSite.Title.ToString _
& "</a>: " _
& subSite.Description.ToString _
& "<br>"
If CInt(subSite.WebTemplateID) = CInt(SPWebTemplate.Meetings) Then
meetingSpaceStr += subSiteHTML
ElseIf CShort(subSite.Configuration) =
CShort(SPWebTemplate.TeamSiteConfiguration.DocumentWorkspace) Then
documentSpaceStr += subSiteHTML
Else
subWebSte += subSiteHTML
End If
Next
str += meetingSpaceStr & documentSpaceStr & subWebStr
Return str
End Function
Visual Basic is not my native (programming) language, so double check the
syntax and casting (I code mostly in C#).
-Jim
"Jim Duncan" <nospam@leavemealone.pls> wrote in message
news:uUW$0VtiEHA.2544@TK2MSFTNGP10.phx.gbl...
> Hi Eric,
>
> The cMySites web part ( http://tinyurl.com/5seds ) will display an image
> showing the type of site (Team Site, Doc Workspace, Meeting Workspace) so
I
> know it's possible. The problem is that I don't remember how I did this
and
> am away from the office (where the source code is). I'll post back with
the
> details when I get back to the office or remember how I did it :-)
>
> Jim Duncan
> Collutions, Inc.
>
>
>
> "Eric" <schmittes06@yahoo.com> wrote in message
> news:u8WDxHsiEHA.2808@TK2MSFTNGP10.phx.gbl...
> > As you can see from the code below I am working on a VB.Net function
that
> > parses a SPWeb collection into three categories: meeting workspaces,
> > document workspaces, and other sub webs. I was able to detect the sites
> > that where made with a meeting template. However, I cannot figure out
how
> to
> > detect if the subSite is a document workspace. I would appreciate it if
> > anyone could lead me in the right direction. -- Eric
> >
> >
> >
>
>
- Next message: rep: "neddddddddd heeelp ----- assembly strong name"
- Previous message: Gordy Reid: "Re: Customizing sharepoint site"
- In reply to: Jim Duncan: "Re: Development Question: How to tell if SPWeb is a Document WorkSpace?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|