Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Murray Roke 467 posts 875 karma points c-trib
    Jun 23, 2015 @ 02:38
    Murray Roke
    0

    How do I programatically move a property to the default property Group?

    How do I programatically move a property to the default property Group? I've tried:

    var ct = ApplicationContext.Current.Services.ContentTypeService.GetContentType("Page");
    ct.MovePropertyType("alias",null);
    ApplicationContext.Current.Services.ContentTypeService.Save(ct);
    

    but it does not move.

  • Peter Gregory 407 posts 1611 karma points MVP 3x admin c-trib
    Jun 23, 2015 @ 04:45
    Peter Gregory
    0

    Hey Muz

    Are you meaning you want to move the property to another tab?

  • Murray Roke 467 posts 875 karma points c-trib
    Jun 24, 2015 @ 01:38
    Murray Roke
    0

    Yes, that's easy if the 'another tab' is a named tab, but if it's the built in "Properties" tab I can't figure out how to do it.

  • Kevin Jump 1867 posts 11859 karma points MVP 4x c-trib
    Jun 23, 2015 @ 08:50
    Kevin Jump
    0

    Hi,

    I think you have to remove it from the group it is in, when a Content Type is in no group then it's shows up in the Generic Properties one.

    ct.PropertyTypes.RemoveItem(oldTabName);
    
  • Kevin Jump 1867 posts 11859 karma points MVP 4x c-trib
    Jun 23, 2015 @ 09:00
    Kevin Jump
    0

    actually you just call RemovePropertyGroup on the content type.

    ct.RemovePropertyGroup(existingTabName);
    
  • Murray Roke 467 posts 875 karma points c-trib
    Jun 24, 2015 @ 01:46
    Murray Roke
    0

    @Kevin When I try RemovePropertyGroup It removes the property that was in the group also, rather than putting it into the default 'Properties' group.

  • Murray Roke 467 posts 875 karma points c-trib
    Jul 13, 2015 @ 20:49
    Murray Roke
    0

    I've added an issue to the bug tracker for this.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies