How to implement base page?

Posted by Community Admin on 04-Aug-2018 12:04

How to implement base page?

All Replies

Posted by Community Admin on 31-Aug-2011 00:00

Hello
Is there any documentation on how to implement a base page in Sitefinity 4.2? I can't find any reference to it beyond the release notes.
Thanks
Ryan

Posted by Community Admin on 31-Aug-2011 00:00

I've experimented with this a bit myself, and it was pretty straightforward.

Simply create a class that inherits from Page:

namespace SitefinityWebApp.Pages
    public class BasePageClass : Page
    
        protected void Page_Load(object sender, EventArgs e)
        
            // do stuff!
        
    

Then in Sitefinity, open the Title and Properties for the page you want to set the base and at the bottom input that base page class (be sure to include the full namespace).

See the attached screenshot for how I did it.

Currently you need to set it per page, but I believe a global base page is in the works for a future release. I'll send your feedback to the documentation team so that we can include this in the developer manual.

Hope this was helpful!

Posted by Community Admin on 01-Sep-2011 00:00

Thanks! That's what I was looking for. All working great now.

Ryan

This thread is closed