void IInstallablePlugin.Install(Version lastInstalledVersion)
        {
            base.Install(lastInstalledVersion);

            foreach (var theme in Themes.List(ThemeTypes.Weblog))
            {
                if (ThemePages.FactoryDefaultExists(theme, "post", false))
                {
                    var fragments = ThemePageContentFragments.ListFactoryDefault(theme, "post", false);

                    var findFrag = GetScriptedFragmentName("66335d7ac5c841429709a730aec55ac9");

                    if (!fragments.Any(f => f.ContentFragmentType == findFrag))
                    {
                        ThemePageContentFragments.InsertInFactoryDefault(theme, "post", false, GetScriptedFragmentName("aa55795b63a949718dea4032197f3507"), ContentFragmentPlacement.After, findFrag, "fragmentHeader=%24%7Bresource%3AContentDiscuss_Header%7D&textAreaSelector=.blog-post%20.post-content.user-defined-markup", "full-border with-header");
                    }
                }
            }
        }
예제 #2
0
 void InsertWidget(Evolution.Extensibility.UI.Version1.Theme theme, string pageName, bool isCustom, string existingContentFragmentType, ContentFragmentPlacement placement, string regionName, string contentFragmentType, string contentFragmentConfiguration, string contentFragmentWrappingFormat)
 {
     ThemePageContentFragments.RemoveFromDefault(theme, pageName, isCustom, contentFragmentType);
     ThemePageContentFragments.InsertInDefault(theme, pageName, isCustom, existingContentFragmentType, placement, regionName, contentFragmentType, contentFragmentConfiguration, contentFragmentWrappingFormat);
 }