Custom page.aspx in a theme

Feb 26, 2012 at 6:38 PM

I can't figure out (or find) how to use a custom page.aspx file in a theme. Currently for development I'm editing the page.aspx that is installed in the blogengine root folder.

How do I implement a custom page.aspx file in a theme. My guess is I need to refer to it in the site.master or site.master.cs file. 

If someone can point me to a theme that has this implemented I can probably figure it out.

Cheers.

Feb 26, 2012 at 7:34 PM

I have many custom pages on this site, here is one of them.

 

http://www.sahcinfo.org/current_hikes.aspx

Feb 26, 2012 at 8:57 PM

Thanks. Are the custom pages derived from a common page.aspx file or are they completely custom pages? I'd like to utilize a theme specific page.aspx file to have a consistent page layout and use the blogengine title and slug.

If the pages are derived from a common page.aspx (or other name) file, can you tell me how you set up site.master, site.master.cs, or whatever other settings you needed to point to the theme specific page.aspx file?

Feb 26, 2012 at 10:31 PM

If you are using Visual Web Developer Express 2010 just add a new page, choose the master page file and inserting this at the top works for me.

 

<%@ Import Namespace="BlogEngine.Core" %>

Feb 26, 2012 at 10:46 PM

Jerry, thanks for the quick reply. That is already on the top of my site.master file. My problem is that Blogengine is using the page.aspx file that is in the root directory for displaying page content, not the page.aspx file that is in the theme directory.

BTW, I make it down to Arizona once a year or so to visit my in-laws. I'll have to find a good hike or two on your site!

Feb 26, 2012 at 10:56 PM

I am not following you, just create a new aspx page, choose the master file, name it sample.aspx and use it for all your custom pages.

For example I did just that, named it awards_member.aspx, when finished it looks like this.

 

 

 

<%@ Page Title="" Language="C#"  AutoEventWireup="true" MasterPageFile="~/themes/Portraitpress1/site.master" CodeFile="awards_member.aspx.cs" Inherits="awards_member" %>

<%@ Import Namespace="BlogEngine.Core" %>


Feb 26, 2012 at 11:04 PM

You don't put the new page in the theme directory.