Copied to clipboard

Flag this post as spam?

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


  • Mark Regan 9 posts -20 karma points
    May 10, 2012 @ 17:10
    Mark Regan
    0

    v 5.1 - grammatically creating and setting templates for content types

    I am creating a package for v5.1 and as part of the package create a new content type, set the permitted templates and then set the default template, trouble is that after installing the package the template needs to be manually selected for the new document type, anyone had the same problem and solved it, here is my code:

    hive.Cms().NewContentType("Page")
        .AddPermittedTemplate("pageTemplate")
        .SetDefaultTemplate("pageTemplate ")
        .Define("pageTitle", "singleLineTextBox", "Content")
        .Define("pageContent", "richTextEditor", "Content")
        .Commit();
    
Please Sign in or register to post replies

Write your reply to:

Draft