Sharepoint Forum

 
Home » Forum » Sharepoint       Ask a questionRSS Feeds

SP Area and its Sub Areas

  Asked By: Krista Porter         Date: Jun 30, 2006      Category: Sharepoint      Views: 248
 

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………………..

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

Topics
- 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…..

Tagged:            

 

4 Answers Found

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

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
kjellsj.blogspot.com/.../...as-and-topics-for.html

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

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, 2006       

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, 2006       

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.


Your Answer
  • Answer should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].