示例#1
0
        void CompileCss(global::Umbraco.Core.Events.PublishEventArgs <IContent> e)
        {
            LogHelper.Info <ImulessEvents>("Begin Imuless Publish Event...");

            foreach (var content in e.PublishedEntities)
            {
                if (content.ContentType.Alias == ConfigurationManager.AppSettings["imuless:doctypeAlias"])
                {
                    LogHelper.Info <ImulessEvents>("Begin compile: " + content.Id);
                    var model = ImulessModel.Deserialize(content, ConfigurationManager.AppSettings["imuless:propertyAlias"]);

                    LogHelper.Info <ImulessEvents>(model.Theme);

                    ImulessCore.Compile(model, content.GetDomains());
                }
            }
        }
示例#2
0
 private void ContentService_Published(global::Umbraco.Core.Publishing.IPublishingStrategy sender, global::Umbraco.Core.Events.PublishEventArgs <global::Umbraco.Core.Models.IContent> e)
 {
     // if any rules or config were published,show the reminder message to refresh the display
     if (e.PublishedEntities.Any(x => x.ContentType.Alias.StartsWith("keepOutSecurityRule")))
     {
         RefreshRules();  // ensure rules are updated on the fly
         RefreshConfig(); // likewise the config
         e.Messages.Add(new EventMessage("KeepOut Security", "KeepOut Security updated. Refresh the node tree to reflect changes", EventMessageType.Warning));
     }
 }
示例#3
0
 private void ContentService_Published(global::Umbraco.Core.Services.IContentService sender, global::Umbraco.Core.Events.PublishEventArgs <global::Umbraco.Core.Models.IContent> e)
 {
     AttachedActions.ForEach(a => a.Run());
 }
 private void Log_ContentPublished(global::Umbraco.Core.Publishing.IPublishingStrategy sender, global::Umbraco.Core.Events.PublishEventArgs <global::Umbraco.Core.Models.IContent> e)
 {
     foreach (var entity in e.PublishedEntities)
     {
         LogAction(entity, "published");
     }
 }
        /// <summary>
        /// Delete HTML on unpublish
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void ContentServiceUnPublished(global::Umbraco.Core.Publishing.IPublishingStrategy sender, global::Umbraco.Core.Events.PublishEventArgs <IContent> e)
        {
            if (!CheckConfig())
            {
                return;
            }

            foreach (var content in e.PublishedEntities.Where(Content => Content.Id > 0))
            {
                HtmlCache.Remove(content.Id);
            }
        }
 /// <summary>
 /// Republishing all nodes tends to throw timeouts if you have enough of them. This
 /// should prevent that without modifying the default for the whole site...
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void ContentService_Publishing(global::Umbraco.Core.Publishing.IPublishingStrategy sender, global::Umbraco.Core.Events.PublishEventArgs <IContent> e)
 {
     Library.SetTimeout(Config.Instance.GetByKey("ScriptTimeout"));
 }
示例#7
0
 void PublishingStrategy_Published(IPublishingStrategy sender, global::Umbraco.Core.Events.PublishEventArgs <IContent> e)
 {
     CompileCss(e);
 }