Skip to main content

Posts

Showing posts with the label Content Types

LinkedIn discussion about Content Type as Feature

Have got some good conversation about Content Type Hub and alternative solution that I suggested in the recent post : Details on LinkedIn

Content Type as Feature

Content Type Syndication Hub is a great feature of #SharePoint2010 and upper. In the following post I described it in detail: http://wyldesharepoint.blogspot.com/2012/03/content-type-syndication-hub-explained.html However in some scenarios this feature is not the best approach. In many organisations there is usually a set of #SharePoint farms that may include all or some of the following: Development (DEV) environment Test (TST) environment UAT environment Production (PROD) environment Ideally the process of creating some custom #SharePoint work may look like: Create #SharePoint artifacts in DEV and package them Copy the packaged artifacts from DEV to TST, install there and test Rework the artifacts if there are issues in DEV then copy and test in TST until it all works well Copy the packaged artifacts to UAT, install there and allow end users to test Rework if required until UAT is completed without issues Copy the packaged artifacts to PROD, install and test ...

Delete Published Content Type from a Document Library

If you use a content type that has been published from a Content Type Hub in your document library then if you decide to delete that content type from the document library you might experience the problem - for some reason published content types are made read only when you add them to libraries. Example 1. We have got a document library with published content type "BaseDocument": 2. If we try deleting it from the library we are getting an error: "The content type "X" at "Document Library Y" is read only." Solution Using SharePoint API we can update the ReadOnly property and then delete the content type. Here's the PowerShell script sample: $siteurl = "http://siteurl" $ctname = "BaseDocument" $libname = "Shared Documents" $site = Get-SPSite $siteurl $web = $site.OpenWeb() $list = $web.Lists[$libname] $ct = $list.ContentTypes[$ctname] $ct.ReadOnly = $false $ct...