Dynamicweb 8 Documentation
Standard.Paragraph Class
Members  Example 

Provides notification names for paragraphs.
Syntax
'Declaration
 
Public NotInheritable Class Standard.Paragraph 
public sealed class Standard.Paragraph 
Example
How to subscribe to the paragraph notification in DynamicwebHow to subscribe to the paragraph notification in Dynamicweb
namespace Dynamicweb.Examples.CSharp.Notifications.Standard
{
    [Extensibility.Subscribe(Dynamicweb.Notifications.Standard.Paragraph.OnBeforeRender)]
    public class ParagraphOnBeforeRenderObserver : Dynamicweb.Extensibility.NotificationSubscriber
    {
        public override void OnNotify(string notification, Dynamicweb.Extensibility.NotificationArgs args)
        {
            if (args == null)
                return;

            Dynamicweb.Notifications.Standard.Paragraph.OnBeforeRenderArgs item = (Dynamicweb.Notifications.Standard.Paragraph.OnBeforeRenderArgs)args;
            //Change paragrpah template html
            item.ParagraphTemplate.Html = string.Format("Paragraph ID:{0}<fieldset>{1}</fieldset>", item.Paragraph.Paragraph.ParagraphID, item.ParagraphTemplate.Html);
        }
    }
}

Namespace Notifications.Standard
    <Extensibility.Subscribe(Global.Dynamicweb.Notifications.Standard.Paragraph.OnBeforeRender)> _
    Public Class ParagraphOnBeforeRenderObserver
        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 item As Global.Dynamicweb.Notifications.Standard.Paragraph.OnBeforeRenderArgs = DirectCast(args, Global.Dynamicweb.Notifications.Standard.Paragraph.OnBeforeRenderArgs)
            'Change paragrpah template html
            item.ParagraphTemplate.Html = String.Format("Paragraph ID:{0}&lt;fieldset&gt;{1}&lt;/fieldset&gt;", item.Paragraph.Paragraph.ParagraphID, item.ParagraphTemplate.Html)
        End Sub
    End Class
End Namespace
Inheritance Hierarchy

System.Object
   Dynamicweb.Notifications.Standard.Paragraph

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.Paragraph Members
Dynamicweb.Notifications Namespace

Send Feedback