What’s to talk about when adding an ASPX page to a web site? We all do it without thinking, right? True enough, but when working in a framework like Sueetie we want to conform to the existing layout structure, easily plug-in to the theming model and take advantage of framework features like Analytics Reporting. Thus a blog post to do the thinking so you don’t have to.
Sueetie ASPX Page Essentials
You would create an ASPX page on your Sueetie site just as you would any website. It may or may not have a codebehind file, but it will most likely use a .Master file. We're going to use the Sueetie Features page at Sueetie.com as a reference for this guide. It is not a blog post, wiki page or CMS page. It's a simple ASPX page with some HTML (and lots and lots of jQuery...) Here's a screenshot of its structure, no different than any ASPX page you created before.
As you can see it uses a CodeBehind file, but no Master Page is designated. The Sueetie standard page construction is for the Master Page to be designated in the CodeBehind, along with the Page Title. Both can be declared on the ASPX page and you do not need a CodeBehind file.
Since we're using a CodeBehind, let's take a look at it. The important thing to remember (circled below) is to inherit from SueetieBaseThemedPage. One other instructional point is that the page title is localized and uses the "sueetie_features" resource string from the /util/languages/LANGUAGE/PageTitles.xml file. You'll notice "sueetie_features" passed to the Sueetie Base Themed Page. You'll notice that this page uses the CMS.Master file. Your ASPX pages can use any existing or new Master file you wish. CMS.Master was used with Sueetie Features only to retain the look of other CMS pages. A final point on Sueetie Master files is that all master files in a Sueetie Theme (as they do in Lollipop) inherit from Sueetie.Master.
Location of Sueetie ASPX Pages and CodeBehind Files
For framework conformity you'll want to store ASPX pages in /themes/THEME/pages. If you're using multiple pages you may want to create a separate folder in your themes area.
CodeBehind pages are by convention stored in /CodeFiles/Pages.
Controlling ASPX Page URLs
The Url of the Sueetie Features page is /features.aspx, yet the page is physically located in /themes/THEME/pages as we discussed. This is where the /util/config/url.config comes into play to control the page's url. The bottom line is used for the Sueetie Features page.
Framework Integration of ASPX Pages
To discuss the integration of ASPX pages in Sueetie Framework features like Analytics Reporting, it's important to discuss "Sueetie Content." Sueetie Content is any application-generated data object. Content Pages (not CMS Pages) are pages containing an application-generated data object. Examples of application-generated Sueetie Content include wiki pages, forum discussions, Sueetie CMS pages, Marketplace Product pages, and so on. Therefore, ASPX pages like the Sueetie Features page are NOT Sueetie Content pages.
The point to remember is that if you’re using Sueetie Framework features with ASPX pages like Sueetie Analytics you will regard them as non-Sueetie Content pages. Since pictures are better than words, here's a Sueetie Analytics report on Page Activity. To view activity on non-Sueetie Content pages, be sure to clear the "Content Pages" checkbox.
That's an ASPX wrap
Hopefully that takes the thinking out of adding ASPX pages to your Sueetie Community while still taking advantage of Sueetie Framework features like Analytics.