This site uses cookies. By continuing you accept the use of cookies.I Accept

One of the greatest things about SiteFactory CMS is the ability to extend it with Extensions. To make this possible, we developed an extension engine that was introduced in SiteFactory 3.0 SP3, and enhanced in SiteFactory CMS 4.0.

The extensions interacts with Eventhandlers in the system and we are adding more Custom Eventhandlers regularly.

Today we have Custom Eventhandlers in these areas:

Pages

The Page Object has the following Eventhandlers:

OnServing
Every time a page is sent to the output this Eventhandler kicks in and the PageServingEventArgs presents the HTML-output (Body) and you are able to make changes to it just before it is sent to the output.

image
A simple example that converts the Body content to Upper Case.

OnSaving
When a page is created, modified or deleted OnSaving is triggered. With the PageSavingEventArgs you can access the altered Page Object and also the type of change that was made.

image
This example sends an e-mail regarding the change.

Blog Module

The Blog Module currently has these two Eventhandlers that are similar to the ones in the Page Object.

OnServing
Is triggered when a blog post is sent to the output.

OnSaving
Is triggered when a blog post is created, modified or deleted. This is very useful when you want to attach a class for publishing a blog post to services like Facebook and Twitter.

Mindbite Core Foundation Server

The Core has these powerful Eventhandlers:

Security.GenericSecurity.OnSigningOn
When a user Signs On to SiteFactory CMS with internal credentials or public credentials this Eventhandler is triggered which gives the developer the ability to catch the User Object. It is also possible to cancel the Sign On Sequence.

Google.SiteMap.OnServing
Every time a change is made in the system, the Google Sitemap is regenerated (sitemap.xml) with new urls, timestamps and other SEO data. By default only Page Objects are represented in the Google Sitemap, but if the web site has other urls that must be added to the sitemap, the developer can use this Eventhandler to append new nodes in the sitemap.

image
This example adds the dummy url “http://www.dummydomain.com” to the Google Sitemap, and appends some SEO data.

Cms.Sitemap.OnServing
This Eventhandler is similar to the Google Sitemap Eventhandler, but it affects the Web Sitemap in the web site.

image

 

Closing comments

Extensions is a powerful and easy part of SiteFactory CMS, and it’s used in almost every project.

In my 4th part in this series I’ve decided to blog about Mindbite Core Foundation Server and our Update Server that keeps SiteFactory CMS 4 web sites updated with the latest version.

Post a comment

Post a comment