(828) 862-6667

Sitefinity Blogs


  • Little known Sitefinity configuration settings
  • More detailed examples for Sitefinity component usage
  • Work-arounds for Sitefinity limitations
  • Discoveries and Ah-Ha moments 

Custom Page Class in Sitefinity

by Rich Winslow | May 16, 2010

If you'd like to introduce your own code into every page, you can consider creating a page class that inherits from the Sitefnity INTERNALPAGE class, then referencing your code in the CMSENTRYPOINT.ASPX page.

public class CustomAnalytics : InternalPage  
{  
    protected override void OnPreInit(EventArgs e)  
    {  
        base.OnPreInit(e);  
        Your custom code here
 
    }  

Sitefinity provides the ~\Sitefinity\CmsEntryPoint.aspx page for you to set page inherititance to your new page class that all CMS pages will inherit.  Add the following to the CmsEntryPoint page:

<%@ Page Inherits="CustomAnalytics" MasterPageFile="~/Sitefinity/Common.master" %>

Put your new page class code in App_Code, then your class will become the code-behind for all pages.

2 Comments

  1. 1 Puma España 11 May
    e 2 guys received about. Inside <strong><a href=http://www.pumazapatillas.es/hombres-puma-puma-baylee-futuro-gato-c-165_167.html title=puma calzado>puma calzado</a></strong> the 1990s this individual reinvented themselve
  2. 2 jordan 3 26 Apr
    per hospital day,  <b><a href="http://www.buychristianlouboutinshop.com/">christian louboutin discount</a></b> needs to  <b><a href="http://www.buylouboutinshoesoutlet.com/">louboutin shoes</a></b> spend several hundred dollars.  <b><a href="http://www.buylouboutinshoesoutlet.com/">cheap louboutin shoes</a></b>  currently, Xiaojuan family has to  <b><a href="http://www.buychristianlouboutinshop.com/">christian louboutin outlet</a></b> be boss  <b><a href="http://www.buylouboutinshoesoutlet.com/">louboutin outlet</a></b> Lee court.But  <b><a href="http://www.buylouboutinshoesoutlet.com/">louboutin shoes sale</a></b> the.  <b><a href="http://www.buychristianlouboutinshop.com/">christian louboutin daffodil</a></b>

Comment

  1.    
     
     
      
       

Why Give Our Secrets Away?

I often get asked why I'm willing to journal all of my Sitefinity discoveries. People think I'm insane to give away for free what I labored over at some point.

Let me answer that in 2 parts:

  • Why journal my discoveries?

    Because I forget and I want to a library of knowledge to refer back to. Oh but it is far worse than that... THREE TIMES now, I've gone to Google and searched for a solution to a problem, only to find MY OWN BLOG entry is #1 in Google and viola! there's the solution!
  • Why give it away for free?

    Because others have been kind enough to do it for us; what goes around, comes around.

    There are all levels of experience, thus someone with less experience may defer to us when needed.

    The lines of 'competition' are very much blurred; in our minds competition is a potential customer or partnership in the right situation.

    We maintain healthy partnerships with one of our competitors; they come to us when they need help and visa versa.

    There is plenty of work out there for everyone if you are putting out quality work and you are straightforward with clients and competition.

Talk to us about how we can help YOU!

 


Don't miss out!

Keep up with our Sitefinity discoveries!
Click on the RSS feed icon below or sign up for our newsletter.


Email Address:
     















Company Info  |   Contact Us  |   Site Map  |   Terms  |   Privacy Policy  |  

Automated Results Computer Consulting LLC, 222 South Caldwell Street, Brevard, NC 28712 (828) 862-6667