Alot of you are wondering what really has changed in the InsiteCreation CMS Version 2.3. Alot changed visually, but behind the scenes, alot more is going on that meets the eye. The framework is currently being developed and started to allow developers to Extend the current pages to allow more Flexibility and Abstracting code away from the presentation layer. Unlink MVC (Model View Controller), code should be seperated from the presentation layer. So what was done is put more code into objects and loading object to the page based on users selection. So what does this mean?
When users wants to get properties from the current executing page or for anypage at that matter, they are readily available to you. For example, you want to get the owner of the currently executing page and set the value to a label. This is easy now. View the same below how you would do this.
lblOwner.Text = New InsitePage(HttpContext.Current.Items("_page").ToString(), PageResult.PublishedPageReturned).owner
This will return the value to the label of the currently executed page.
So the next question, how does all this help me in my site. Say you want to make a menu. Insite now exposes the listing object. In code now, you can get a listing of any page on the site. Well you can do this already from the admin panel so what is so different. Say you want to spin the listing. You would do this which would grab a listing and display another listing of the pages inside that listing....
Example
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
If Not IsPostBack Then
'Get Listing
listingsample.DataSource = New InsiteListing().GetListing("1", 0, 100, Nothing)
listingsample.DataBind()
End If
End Sub
Protected Sub listingsample_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.RepeaterItemEventArgs)
If e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem Then
Dim secondRepeater As Repeater = CType(e.Item.FindControl("secondsample"), Repeater)
Dim currentItem As InsiteListingPage = CType(e.Item.DataItem, InsiteListingPage)
secondRepeater.DataSource = New InsiteListing().GetListing(currentItem.page_id.ToString, 0, 100, Nothing)
secondRepeater.DataBind()
End If
End Sub
This should help out alittle, if not, take a look at the download below and it should help you understand the importance of what Iniste is doing with their framework.