Share via


Sharepoint 2003 : How to add links to the "Sites I have added" listing at the portal

The following is the sample code snippet to add links to the Sites listing. Unfortunatly this is not documented in the Sharepoint SDK.

 

//Get the Site

SPSite site = new SPSite(<URL>);

//Get the portal context

PortalContext context = PortalApplication.GetContext(site.ID);

//Get the guid

Guid guid = AreaManager.GetSystemAreaGuid(context, SystemArea.SiteRegistry);

//Get the area

Area area = AreaManager.GetArea(context, guid);

//Get the area listing collection

AreaListingCollection objALC = area.Listings;

//Add the link to the listing

AreaListing objAL = objALC.AddListing("<Title>","<Description>",ListingType.Site, “<URL>” ,null);

objAL.Update();

Comments