SharePoint Web Part to View List from Different SharePoint Site - sharepoint-2010

I am working on SharePoint 2010 instance. I want to be able to view list content in the SharePoint site that this list doesn't belong to. My site does not even share the same site collection as the one containing the list. Is this possible without the custom SharePoint solution coding? Thanks.

Here is a workaround:
http://sp2010.pathtosharepoint.com/SharePoint-User-Toolkit/Pages/Cross-Site-List-Snapshot.aspx
This will work across site collections, as long as the source and target pages are in the same domain. It'll work fine if your only purpose is to display the content, not use the context menus.
Other solutions like Data View Web Part or Content Query Web Part won't work across site collections.

Related

How do you switch to a different site template in SharePoint 2010?

If you used a site template (such as the Document Center template) and wish to use a different template (such as a Team Site), how can you accomplish this? More importantly, how do you do this without losing permissions that have been setup on the document libraries, lists, etc?
This functionality is not available in SP2010. Once a site is setup with a template that is how it is created. That being said, you can simply add the functionality you require to make the site appear to be of another template. By selecting a template, you are simply setting a starting point and not restricted future usage.

Create content types available in multiple site collections

I want to create a content type, lets call it MyDocument with some properties we need. However we have 10 departments each one with its own site collection.
I want all documents to be created using MyDocument,across all site collections.
Thanks
In SharePoint 2010, you can use a Content Type Hub.
From Plan to share terminology and content types:
To share content types among site collections, you make one content type gallery the “hub” of a managed metadata service, create connections to the service from each Web application that contains a site collection, and specify that site collections should use the content types in the service.
The same effect can also be achieved using a custom Feature.

prevent duplicate site / page / layouts / templates / webparts, possible

We have a sharepoint environment with many sites (and sometimes many site collections). Each site (or site collection) has the same default page with some custom webparts that use sitecolumn values (for example a projectcode or clientcode) to show information from external systems. (for each project we have to create a separate site (or site collection) because of other reasons)
What is the best approach to minimize duplication? The dynamic parts of the page are stored in site columns. When we add a new webpart, ideally the default page every site/page should show the new webpart without spreading the update to the individual pages
Thanks
One approach you may want to take is to use the web part as a wrapper for a user control. The user control does the heavy lifting on the site. Once the web part is included on your pages, the user control should be able to tell which site it is being executed on and pull the necessary dynamic data from your site columns.
When you need to make updates, you update the user control and then redeploy the solution package to the farm. Each site will pick up the change as soon as the solution is deployed.
Here is a little information about this approach:
http://msdn.microsoft.com/en-us/library/ff649867.aspx.
The above article relates to WSS 3.0, but that should give you a starting point.
An approach you may want to look at for SharePoint 2010 is a visual web part. More info can be found here: http://msdn.microsoft.com/en-us/library/ff597539.aspx.

How to add bunch of aspx files to a site definition sp2010 vs2010 project

I need to be able to deploy bunch of aspx files when a site (sub-site aka web) is provisioned. I added a feature but it seems whole feature thing has changed with vs 2010 or sp2010. I am totally lost. All I want to do is to deploy these pages when a web is provisioned. Is it possible?
You can't drop aspx pages into SharePoint per say. If you want to add functionality, some of the options are:
1) Using Web Parts - probably the most popular method
2) User Controls
At the end of the day, you will create it as a Feature using VSeWSS 3.0 in VS and packaging/deploying it as a solution. Steer clear of trying to hack this up in SharePoint Designer - for one, you won't have source control like you have with a Feature.
http://www.andrewconnell.com/blog/articles/UsingCodeBehindFilesInSharePointSites.aspx
http://www.codersbarn.com/?tag=/webpart

SharePoint 2010: Point a PortalSiteMapProvider to a specific site collection

Is it possible to get an OOTB PortalSiteMapProvider to provide a site heirarchy from a specified site collection or URL (i.e. not the current site collection) in SharePoint 2010? In MOSS this was only possible by creating a custom SiteMapProvider, traversing the site collections and manually building the navigation tree.
NB: I am not prepared to write a
custom SiteMapProvider that reads from
a static XML (.sitemap) file as the regular site contributors may not have access to files on the file system.
A little bit of background... I have a single web application with 2x site collections:
1 for my intranet portal at http://intranet/ (publishing enabled)
1 for the My Sites at http://intranet/my (publishing not enabled)
We have no plans to facilitate multiple portals, therefore, I would like a consistant global navigation bar across both site collections. Ideally, I'd like the My Sites to show the site heirarchy from the main portal site. So is it possible to set the PortalSiteMapProvider.CurrentSite property to "http://intranet/" instead of "http://intranet/my"?
To achieve this behaviour I wrote my own web service which goes off and traverses another site collection's hierarchy (using it's own PortalSiteMapProvider), and returns that structure as an XML document. I obviously then bound my global navigation navigation menu to that.
I got the concept from here: PortalSiteMapProvider
There is a similar approach describes here which uses HttpHandlers instead: http://blog.symprogress.com/2011/03/sharepoint2010-custom-navigation-provider-cross-sitecollection/