Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Question about Web Part Pages

  Asked By: Tucker    Date: Jan 01    Category: Sharepoint    Views: 796

Please bear with me, I'm kind of new to Sharepoint 2003. I've got a
project where we are going to be giving salesman (read non-technical)
some consolidated information on their My Sites. We want to be able
to make sure that certain Web Parts will always be on the page, while
still allowing them to customize it some and add other web parts that
are available.

What's the best approach to do this? We currently have about 50
salesman, and the other employees in our company are already using
the 'My Sites' as well.



8 Answers Found

Answer #1    Answered By: Stephon Valentine     Answered On: Jan 01

If you can have all of the mandatory web  parts in a zone you can turn off the ability for the sales people to modify things in that zone. Of course, you’ll have to propagate the web parts… and you’ll have to deal with the fact you would be changing the site definition for the my sites…

Answer #2    Answered By: Leif Cardenas     Answered On: Jan 01

If you want the salesmen to have their My Sites look differently than
all other users' My Sites, you may just have to settle for writing up
concise instructions for them. Editing the My Site definition or
controlling the interface through modifications as an admin will affect
all personal sites, there isn't a way to target changes to just the
sales people.

Answer #3    Answered By: Jasper Hatfield     Answered On: Jan 01

Is there a way to modify the contents of a web  part page
programatically. If we have a web part  that we can put on the page
that would check for the parts we want them to have, and add them if
they are missing would work well enough. And from within that web
part we can check if they are salesman or not using their domain
account and only let the salesman be able to run that part.

In fact if I'm not mistaken we could add that web part to the My
Site template as a hidden part, and have it do this check. That
would handle doing it automatically.

Answer #4    Answered By: Rashawn Hopper     Answered On: Jan 01

Yes, there is a way to modify the web  parts on a page programmatically. However, there are a few issues. You can’t really add ListViewPart or ListFormWebPart because they have embedded GUIDs… and the import process for ListViewWebPart is broken. (This is the web part  that most people mistake for the list itself.

Echo from WinAppTechnologies does this. I have some code, not in a finalized product form, that does the same thing.

Note that you’ll have to flip a bit to allow one web part to add other web parts to the page, you’ll have to work out impersonation, and the web parts are likely to not load the first time through. (The list of web parts for the page has already been generated by the time your web part adds them to the page.

I suppose I should blog about my SPWPADM utility … it will allow you to script additions and deletions of web parts from a command line. It would be a crude way to do it but you could force the web parts to appear on a periodic basis with the tool. Send me an off-list email if you want to beta it.

Answer #5    Answered By: Horace Coffey     Answered On: Jan 01

Ok, I found an excellent post that discusses and has code samples on how to add web  parts to your page programmatically and it works quite well. Here's the link to Jan Tielen's blog about it.


Answer #6    Answered By: Rigoberto Beard     Answered On: Jan 01

What isn’t discussed there are the bugs related to the tool bar and the default view …

Re: Toolbar – You can’t set the toolbar to anything except summary for a ListViewWebPart using this mechanism.

Re: DefaultView – The view type (datasheet/html) is derived from the default view for a list. If you want a different base type for a list on your home page than is the default view for the list you’ll have a problem.

These two issues probably cost me 50-100 hrs each.

Answer #7    Answered By: Alphonso Mckay     Answered On: Jan 01

Perhaps you could put the Web Parts into a locked down Web Zone.

You may also consider making those Web Parts only visible to people in
the "Sales" audience.

Answer #8    Answered By: Daron Oneill     Answered On: Jan 01

That snippet of code from the blog is working fine, I've put together a prototype and it's able to add the parts to the web  page and make sure that they are still there.

Didn't find what you were looking for? Find more on Question about Web Part Pages Or get search suggestion and latest updates.