Example #1
0
    private static void PreparePageWithDefaultTemplate(DocumentManagerEventArgs e, string templateIdentifier)
    {
        var configuration = new PageTemplateConfiguration
        {
            Identifier = templateIdentifier
        };

        var json = new PageTemplateConfigurationSerializer().Serialize(configuration);

        e.Node.SetValue("DocumentPageTemplateConfiguration", json);
    }
Example #2
0
    private static string GetTemplateConfiguration(PageTemplateConfigurationInfo template)
    {
        var templateConfiguration = template.PageTemplateConfigurationTemplate;

        PageTemplateConfigurationSerializer serializer = new PageTemplateConfigurationSerializer();

        var templateConfigurationInstance = serializer.Deserialize(templateConfiguration);

        templateConfigurationInstance.ConfigurationIdentifier = template.PageTemplateConfigurationGUID;

        return(serializer.Serialize(templateConfigurationInstance));
    }