views:

1009

answers:

3

Is there a way to get a site's (site collection) site directory, the one which is defined within the web site collection setting of a collaboration or publishing portal?

Of course I could iterate through all the SPWebs of the site collection but I hope there's a easier way to get the directory as the information seems to be already stored somewhere.

Bye, Flo

UPDATE

Of course I want to get the information programmatically.

A: 

Are you referring to the site directory that is under the Site Content and Structure?

If so, you can browse to http://sitename/_layouts/sitemanager.aspx to see site directory (assuming you have sufficient privileges to the site).

Fuzzy Purple Monkey
Thanks for your replay, I know where I could set or get this information over the UI (Browser). But I want to get the site directory's path programmatically.
Flo
A: 

For what it's worth, if you have access to the WSS database(s) you can either leverage off existing SPs or create your own. I wanted to return things like 'RequestAccessEmail' and incorporate that into our own site maps (handy to know who the site owner is sometimes). Our SP at it's most basic...

CREATE PROCEDURE [dbo].[my_sitemap](
   @PartialUrl nvarchar(260)
)

AS
   SELECT    ID, FullUrl, Title, RequestAccessEmail
   FROM      Webs
   WHERE     FullUrl LIKE @PartialUrl + '%'
   ORDER BY  FullUrl
GO

Worked very well for me. Hope this helps.

Hedley Lamarr
+1  A: 
Edward Wilde