I am beginning sharepoint development and have some quick questions concerning basic terms.
How do i find out whether a particular site is a site collection, or a site JUST BY THE URL? Is their a powershell command to do this?
I was creating some sites in sharepoint. Some sites were appended with /sites/sitename whereas others were just under the base url of sharepoint. What is the difference between the 2? AND, how do i recreate the ones under the sites node? For some reason, I cant find the option to create under the sites node again. Please explain this concept as all msdn tutorial are very confusion for beginners like me. Those are good once you get the hang of basics.
Please provide an analogy how to understand web app, site collection, site, web site, etc.
Is there a way to use NEWFORM.aspx for a document library instead of UPLOAD.aspx?
The Site collection is at the root level of your Web application.
So http://abc.com/ => Site collection
Using Powershell, open the Sharepoint Powershell prompt and run Get-SPSite to get all Site-Collections
the /sites/ is called as a managed path
It can be defined in the Central Administration for every web application.
The option to select the /sites will be available only when you create the second site collection under the Web Application (The first one take the / by default.)
Have a look at Technet Article
document library is for uploading file, not for storing user submitted data, for that you need to create a list
1) Document Set is used in cases where multiple documents have the same properties, its like putting all these documents in a folder and then providing attributes to that folder which are in turn applied for each document in that folder.
In your case, if all the files have the same values for the 8 fields then the document set is the correct way to go.
2)If there is additional metadata associated with the files then these can be added either to the content type (eg. document or document set content type) or to the columns in the library itself, you dont need to create a separate list for holding that data. Adding data to the content type ensures consistency across all the document libraries within that site collection, adding columns to the library affects only that library.
Related
I am trying to get a list of all documents within my SharePoint Site, owner and date last modified.
It is a SharePoint 2010 Enterprise environment.
It's a site which has many subsites.
All solutions I have tried only allow me to get documents at that specific site level and not subsites.
I must admit, I can get the required information by querying the SQL DB directly but don't want to go down this path, as it's unsupported by MS
Any help would be appreciated.
You can get this information quite easy by using Powershell, you just need to iterate through all subsites and document libraries.
Take a look at these pages:
http://blog.falchionconsulting.com/index.php/2010/08/getting-an-inventory-of-all-sharepoint-documents-using-windows-powershell/
(This is almost exactly what you require, there are a few extra lines that you don't need).
http://www.sharepoint-journey.com/get-all-document-libraries-in-a-site-collection.html
https://sharepoint.stackexchange.com/questions/126397/powershell-get-a-list-of-all-the-document-libraries-for-a-web-application-incl
http://blogs.msdn.com/b/varun_malhotra/archive/2012/02/08/sharepoint-2010-powershell-download-all-files-in-document-library-to-network-share-file-share.aspx
We have a special situation at our office where we "close" off a site collection when a project is complete. Our architecture is setup such that each project in play is it's own site collection. When the project is complete we close the project in SP by setting the site collection to read-only.
Part of our business would like to still view the closed site collections, but doesn't want to go through a list of them (I mean excel spreadsheet or some other external form of tracking), but instead wants to do it from a page in SP. Our solution is to modify one of our other solutions (search query web part that finds all site collections they belong to) and only search on closed site collections.
I know how to determine if a site is ReadOnly or not in Powershell (#spSite.IsReadOnly), but that isn't going to work here and going through the properties in search I couldn't find anything that jumped out at me to do this. Does anyone know how to return ReadOnly site collections in a Search Query Web Part?
Thank you.
I know of a managed property called: SiteClosed but I haven't got the slightest idea what it does. Looking at the name this might be the one to start with.
If this doesn't work I'm afraid the only other option is to create a custom Web Part...
We use SharePoint 2007 and have set up a web application with several site collections. One for each of our clients. We'd like to synchronize content in all of the site collections. Maybe having a central repository, then all other site collections get content from here.
I was looking at Lightning Tools Conductor web part and seems a pretty good solution. However, I'm wondering if this can also be possible using the Content Deployment feature to copy a site from the central repository to all other site collections.
I do not advice you to copy and thus duplicate the information from your central repository to the other site collections. You'll lose precious disk space, performance and scalability.
If you have content that is created in a common site collection, you should either use the built-in web services or create dedicated ones to retrieve the content within the targeted site collections.
I usually create cross site collection look-up fields that allows a contributor to pick an entity from my central repository in a visual way and apply the rendering of the content once the page is in view mode.
That might not suit every need but I don't think content duplication is a wiser choice.
Edit : re-reading your question, is there a specific reason why you want to copy a complete site (spweb I guess) rather than specific content inside ?
You can put your documents in SP - cool, but, when its time to reorganize folders structure what I should do with old links?
Is there a way how to identify document instead of using URL where path to the document is used? I need something like permanent link: http://mysharepoint/doc-123, where 123 is the document identifier.
I need URL to the document which doesn't depend on folders where the document is published. Are there solutions?
SP2010 will offer a unique per site collection identifier for each document that you can use with a built-in redirector service.
You can use an URL Shortener solution and combine it with a SharePoint (Designer) Workflow or Event Receiver.
I have worked on a product that can be used in combination with SharePoint and can be used via web services, workflows as well as the user interface.
As your need is quite specific you may need to do a little bit of extra coding. If you don't have access to Visual Studio or prefer to use SharePoint Designer workflows for everything than have a look at the Workflow Power Pack.
You can create database table that contains the mapping to the files (you'll need to update there when the file changes)
the table should contain url wanted to route | url destination
then you could implement an HttpModule that reads that url and then redirects to the one in the table, however that will cost you overall performance so you could create a pattern and only do that when it matches the pattern.
In SharePoint 2007 you could create a redirecting page that takes the unique id of a document as query parameter. Use this id to get the document SPContext.Current.Web.GetFile(id) and redirect the response with the file url.
I am new to SharePoint development. We have created a base site template and have used that template to start new sites in other locations on the same server. This works fine but the newly created site seems to "flatten" the custom content types created in the original site. I would think there would be a way to keep the original content type inheritance intact to help support any necessary modifications on the new site. They can still make the modifications but they take longer because you have to visit each list individually. Does anyone know how to fix this or know a better way to approach this?
The problem you are having is the move from your original site collection to another. The site template does not store the complete definition of a site - only the differences from the underlying site definition. Move from one site collection to another and you lose the underlying site definition and run into problems such as the loss of your content types.
Site templates and site definitions are two separate customizations you can undertake. You need to make a decision based on your requirements as to which is best.
Site templates
Pro's:
Easy to create and reuse through the SharePoint interface
Ideal for end users
A site template is a customization of the underlying default site definition
Con's:
Dependency on underlying site definition means SharePoint updates could break your site templates
Poor performance since the modifications are held in the database and are read from the DB and compiled on each request
Limited customization options
Site definitions
Pro's:
Harder to create: involves coding XML
Made by developers and site administrators
Independent of SharePoint default site definitions so not affected by SharePoint updates
Limitless customization options
Con's:
Difficult to modify when deployed
Can be cached on the file system so is fast to load
Check out Google for info on creating custom site definitions.
Hope this helps!
Jonny
The best way to do this is to create a site definition where the content types are within features whose scope is to the farm.
Tim