Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

SP Area and its Sub Areas

  Asked By: Krista    Date: Jun 30    Category: Sharepoint    Views: 1092

NO body is helping me on this group. This is my third mail… I am looking for a solution …Plz can some one save me………………..

- Subarea1à sub sub Area 1 à n times
- Subarea2 à sub sub Area 2 à un known times
- Subarea3

- HR
- Financial Dept
- Administration Dept
- Development dept

How can I get only the Areas and all its sub areas only from Home. I am not getting a way of filtering other areas….I tried using Sharepoint Topology but I need a for loop for every layer of Area extraction. That won’t work for me…..



4 Answers Found

Answer #1    Answered By: Damon Garner     Answered On: Jun 30

There is no difference between area  and topic.  areas  are the physical way of structuring and classifying information, while topics are logical views of the information. So you cannot differentiate between these two.

you can read more here

Answer #2    Answered By: Dameon Dejesus     Answered On: Jun 30

Here is some code that may help you:

m_PortalContext = PortalApplication.GetContext(this.Context);

Guid guidHome = AreaManager.GetSystemAreaGuid(m_PortalContext, SystemArea.Home);

Area areaHome = AreaManager.GetArea(m_PortalContext, guidHome);

foreach(Area area  in areaHome.Areas) {

//Call recursive function here, passing in the area object, from which you can get area.Areas//


Please remember that we are all contributing on here as a volunteer effort. Some times  we get overwhelmed with our day-to-day activities and are not able to respond right away.

Answer #3    Answered By: Tejaswani Barve     Answered On: Jun 30

The code below is not getting me an area  and all its sub Area in one iteration (For Loop). For each layer I have to make a new for loop… that wuld put me in difficult. I am iterating based on keywords set on the area.

Answer #4    Answered By: Harshita Padwal     Answered On: Jun 30

What you need to do is put the code inside of a recursive function.

Didn't find what you were looking for? Find more on SP Area and its Sub Areas Or get search suggestion and latest updates.