Copied to clipboard

Flag this post as spam?

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


  • Damon 217 posts 288 karma points
    Aug 10, 2015 @ 14:08
    Damon
    0

    Is it possible to add a master document type to a document type after it has been created?

    Hi,

    I have some document types.

    Now, I want to add a master document type the I can apply to existing document types?

    Is this possible?

    Thanks,

  • James 251 posts 1169 karma points
    Aug 10, 2015 @ 14:23
    James
    1

    Hello,

    You can add the master document type to Document Type Composition section of the other document types.

    So create your master document type. Go to your other document types, then go to the structure tab and under "Document Type Compositions" check master.

    This will then apply any additional properties and tabs that exist on master for that page.

    If you want them to sit underneath the master doc type i think you have to delete and recreate them as a child .

    Hope this helps :)

  • Dennis Aaen 4500 posts 18255 karma points admin hq c-trib
    Aug 10, 2015 @ 17:42
    Dennis Aaen
    0

    Hi Damon,

    Yes you have the option to export and import document types. If you go to the settings section and into the Document types folder, and right click on the document type that you want to add to the master document type you will see the export option.

    When you have exported it, then try open the file in a text editor, then you will see something like this.

    <?xml version="1.0" encoding="utf-8"?>
    <DocumentType>
      <Info>
        <Name>Text Page</Name>
        <Alias>TextPage</Alias>
        <Icon>icon-document</Icon>
        <Thumbnail>folder.png</Thumbnail>
        <Description />
        <AllowAtRoot>False</AllowAtRoot>
        <IsListView>False</IsListView>
        <Compositions />
        <AllowedTemplates>
          <Template>TextPage</Template>
        </AllowedTemplates>
        <DefaultTemplate>TextPage</DefaultTemplate>
      </Info>
      <Structure />
      <GenericProperties>
        <GenericProperty>
          <Name>Content</Name>
          <Alias>content</Alias>
          <Type>Umbraco.Grid</Type>
          <Definition>21944c98-8e32-4475-807d-61a60c1ab070</Definition>
          <Tab>Content</Tab>
          <Mandatory>False</Mandatory>
          <Validation />
          <Description><![CDATA[]]></Description>
        </GenericProperty>
      </GenericProperties>
      <Tabs>
        <Tab>
          <Id>17</Id>
          <Caption>Content</Caption>
          <SortOrder>0</SortOrder>
        </Tab>
      </Tabs>
    </DocumentType>
    

    What you need to add to this XML is this:

    <Master></Master>
    

    In the maser your add the alias of the document type that should be the master document type. A whole example would look like this.

    <?xml version="1.0" encoding="utf-8"?>
    <DocumentType>
      <Info>
        <Name>Text Page</Name>
        <Alias>TextPage</Alias>
        <Icon>icon-document</Icon>
        <Thumbnail>folder.png</Thumbnail>
        <Description />
        <AllowAtRoot>False</AllowAtRoot>
        <IsListView>False</IsListView>
        <Master>Master</Master>
        <Compositions />
        <AllowedTemplates>
          <Template>TextPage</Template>
        </AllowedTemplates>
        <DefaultTemplate>TextPage</DefaultTemplate>
      </Info>
      <Structure />
      <GenericProperties>
        <GenericProperty>
          <Name>Content</Name>
          <Alias>content</Alias>
          <Type>Umbraco.Grid</Type>
          <Definition>21944c98-8e32-4475-807d-61a60c1ab070</Definition>
          <Tab>Content</Tab>
          <Mandatory>False</Mandatory>
          <Validation />
          <Description><![CDATA[]]></Description>
        </GenericProperty>
      </GenericProperties>
      <Tabs>
        <Tab>
          <Id>17</Id>
          <Caption>Content</Caption>
          <SortOrder>0</SortOrder>
        </Tab>
      </Tabs>
    </DocumentType>
    

    After this you can import the document type again by click the three dots on Document Types folder.

    Hope this helps,

    /Dennis

Please Sign in or register to post replies

Write your reply to:

Draft