Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

News and Audiences

Status
Not open for further replies.

DotNetNewbie

Programmer
Mar 3, 2004
344
GB
Hi there,

Does anyone know if the following is possible?

I want to create a News or an Announcement (or whatever)list but I also want to be able to target specific audiences.

Any help much appreciated.

Thanks in advance

D.
 
Just to clear something up which might be a bit vague. I have a news section with bits and pieces in it, and of course that news section is targeted at a specific audience. What I would like to do is to be able to target specific news pieces to specific people.

Any ideas would be most welcome.

Thanks in advance

D.
 
I can only think of a "creative approach" so i will explain:

1. make subsites under the site where you want to show the news, These subsites(no content) should be the audiences such as sales, programmers, ect...

2. add the people to the site aka "audience"

3. make a extra column in the news list with the audience types (drop list).

4. make a webpart that checks to which audience(s) a user belongs

Code:
...
SPWeb Web = SiteCollection.OpenWeb();
...
foreach (SPWeb subsite in Web.GetSubwebsForCurrentUser())
{
//itterate trough the subsite aka audiences
   subsite.title
}

The methode returns only the subsite object to which the user belongs.

now finish this webpart by selecting the News and Outputing it to the screen. (you could use the SPQuery object)

Goodluck!
Greetings
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top