Dynamicweb 8 Documentation
PageTitle Field
Example 

Page title notification. Occurs when the title is assigned to a page.
Syntax
'Declaration
 
Public Const PageTitle As String
public const string PageTitle
Example
Overriding the page title in DynamicwebOverriding the page title in Dynamicweb
namespace Dynamicweb.Examples.CSharp.Notifications.Standard
{
    [Extensibility.Subscribe(Dynamicweb.Notifications.Standard.Page.PageTitle)]
    public class PageTitleObserver : Dynamicweb.Extensibility.NotificationSubscriber
    {
        public override void OnNotify(string notification, Dynamicweb.Extensibility.NotificationArgs args)
        {
            if (args == null)            
                return;

            Dynamicweb.Notifications.Standard.Page.PageTitleArgs pta = (Dynamicweb.Notifications.Standard.Page.PageTitleArgs)args;
            pta.PageView.Meta.Title = "hello!";
        }
    }
}
Namespace Notifications.Standard
    <Extensibility.Subscribe(Global.Dynamicweb.Notifications.Standard.Page.PageTitle)> _
    Public Class PageTitleObserver
        Inherits Global.Dynamicweb.Extensibility.NotificationSubscriber

        Public Overrides Sub OnNotify(ByVal notification As String, ByVal args As Global.Dynamicweb.Extensibility.NotificationArgs)
            If args Is Nothing Then
                Return
            End If

            Dim pta As Global.Dynamicweb.Notifications.Standard.Page.PageTitleArgs = DirectCast(args, Global.Dynamicweb.Notifications.Standard.Page.PageTitleArgs)
            pta.PageView.Meta.Title = "hello!"
        End Sub
    End Class
End Namespace
Remarks
The passed NotificationArgs is Dynamicweb.Notifications.Standard.Page.PageTitleArgs
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

Standard.Page Class
Standard.Page Members

Send Feedback