Tag Info

Hot answers tagged

2

Just ran into the same issue - here is how you can configure it to show the display names. On the page with the search results (search for e.g. *): click on the settings wheel on top click on edit page in the navigation zone on the left: on the refinement webpart click on "edit web part" now on the right side the web part properties open - click on ...


2

I think I had success with this by using the Overwrite=True attribute (https://msdn.microsoft.com/en-us/library/office/aa544268.aspx). Also I believe once the content type is in use in a list instance it might be blocked from being removed. Try deleting the instance and then clearing it from both the first stage and second stage recycle bin then ...


2

Use SPListItem.ContentType. This will give SPContentType. And you can use SPContentType.Name to get the name of content type.


2

So if this is happening to you you should first publish your content type, at your content type hub. From there you should click "Manage publishing for this content type" and you will see 3 options: Publish Make this content type available for download for all Web Applications (and Site Collections) consuming content types from this location. Unpublish ...


1

using (SPSite site = new SPSite("http://pbmossdev")) { using (SPWeb web = site.OpenWeb()) { string listName = "New List"; string listDescription = "Test content types on lists"; Guid listId = web.Lists.Add(listName, listDescription, SPListTemplateType.GenericList); SPList myList = ...


1

Go to the List Settings page for your list, scroll down to the Content Types section, click on the link 'Change new button order and default content type', and on the following page uncheck 'Visible' for the Item content type. It will no longer be visible in the new item ribbon menu.


1

The answer to this question is: No, it is not possible to create another library with the same functionality as Pages on a publishing site.


1

Web Part Pages and Wiki pages can be stored in any document library as long as the appropriate content type has been added to the library via its settings. However, the library actually named "Pages" is created & maintained by the Publishing feature. Attempting to rename or delete it will probably not work and/or cause problems. If you want to create ...


1

If the list contains only one content type then in the CustomAction you need to define following three properties: RegistrationType="ContentType" RegistrationId="YourContenttype" Location="CommandUI.Ribbon.ListView" In the CommandUIHandlers, there is EnabledScript attribute which helps in enabling and disabling a button. You can refer to an .js file which ...


1

CommandUIHandler has not only Command and CommandAction attributes but also EnabledScript attribute. It may contains javascript function returning true/false. You may use javascript CSOM to get content type of the item(s) and enable/disable your button. Hiding button completely is different story and is not usual in SP. <CommandUIHandler ...


1

WPQ2FormCtx.ItemContentTypeId will give the content type ID of the item in each of the forms newform.aspx, ediform.aspx and displayform.aspx. You can also use WPQ2FormCtx.ItemContentTypeName, if you want to compare name instead of Id. Here is a JQuery code to hide fields in the forms: <script type="text/javascript"> jQuery(document).ready(function($) ...


1

Setting ContentType field property ShowInEditForm="FALSE" will not affect the visibility of Content Type Choice control in Edit form. The visibility of Content Type Choice control (ChangeContentType class) is determined the following conditions: whether content types are enabled for the list (SPList.ContentTypesEnabled property) the amount of available ...


1

One reason to beware of many content types is the impact it has on general site collection creation times. Each time a new site collection is created, all syndicated content types in connected hubs are copied down to it. So the more content types you have the slower it becomes to create site collections. In our staging environment, we found that once we ...



Only top voted, non community-wiki answers of a minimum length are eligible