Developer forum

Forum » Templates » Methods that can be extended using notification subscribers

Methods that can be extended using notification subscribers

Unnsteinn Garðarsson
Unnsteinn Garðarsson
Reply

Not sure if this is the right place for this post but it is related to the training documentation. I noticed the below text in the documentation for the T3 test under Templates and Rendering and as far as I know only the Template Extenders are used to extend what is output to the page. Is there something that I am missing here? What methods can be extended using the notification subscribers ? 

 

All sections (app, paragraph, and page) have an output method which outputs the content as a string value. These methods may be extended using notification subscribers, which makes it possible to manipulate the content/output.

ssa

 

 

Replies

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

As one example, you could subscribe to Dynamicweb.Notifications.Standard.Page.OnOutput which gives you access to an instance of Dynamicweb.Notifications.Standard.Page.OnOutputArgs. That class exposes a PageViewTemplate that I think you can use to manipulate the output.

So technically you're not extending the output method, but you can change / extend the output (the HTML) of that method.

Imar

 
Shiwanka Chathuranga Dynamicweb Employee
Shiwanka Chathuranga
Reply

"What methods can be extended using the notification subscribers"

i can give you simplest example, just think you need to send SMS to the customer after complete the order, you can use CheckoutDoneOrderIsComplete  subscriber to call you SMS api.

here is all avaialble notification subscribers http://doc.dynamicweb-cms.com/api/html/59a82bc6-cce3-1592-2901-70342df8694f.htm

 

 

 

You must be logged in to post in the forum