Click or drag to resize

NotificationsFrontendBeforeLoad Field

Occurs when the module is about to process the request.

Namespace:  Dynamicweb.News
Assembly:  Dynamicweb.News (in Dynamicweb.News.dll) Version: 1.0.10
Syntax
public const string BeforeLoad = "DWN_MODULES_NEWSV2_FRONTEND_BEFORELOAD"

Field Value

Type: String
Remarks
Examples
Example
[Dynamicweb.Extensibility.Subscribe(Dynamicweb.Notifications.NewsV2.Frontend.BeforeLoad)]
    public class NewsV2BeforeLoadObserver : Dynamicweb.Extensibility.NotificationSubscriber
    {
        public override void OnNotify(string notification, Dynamicweb.Extensibility.NotificationArgs args)
        {
            if (args == null || !(args is Dynamicweb.NewsV2.Extensibility.FrontendNotificationArgs))
                return;

            Dynamicweb.NewsV2.Extensibility.FrontendNotificationArgs item = (Dynamicweb.NewsV2.Extensibility.FrontendNotificationArgs)args;

            item.ModuleInstance.Pageview.Meta.Add("newsv2-meta-tag","hello");
        }
    }
See Also