Mono Support Monox - Set Default Template page. 

Viewed 14058 time(s), 6 post(s), 2/13/2012 9:08:03 PM - by shawndg
2/13/2012 9:08:03 PM
1871 Reputation 252 Total posts

Hello,

Ok well I made a template and it works fine if I hard code it in but when I try to set it inside the admin..

I pick scene then enter my master page...
ThePittsburghSceneHeader.master or ThePittsburghSceneHeader
both gave me a error. not compatible with my design template... odd works in code..

I even tried putting in the whole path but then i got a real bad error.. cant be over 50 chars long..

1#
I have two questions.. how to make above work..

2#
Can I somehow modify MonoX settings to auto apply my custom template and set the master pages when a user creates a page in the admin interface ?

1
2/14/2012 3:20:03 PM
15993 Reputation 2214 Total posts

Hi,

can you tell us where did you put your newly created template is it under the App_Templates/YourThemeName/PageTemplates or ? When you create a new page you need to select it from the template you have created and that template needs to inherit from the MonoX.master so it can work properly. Can you please provide us with more info on this, e.g. exact error that you get etc.

Regards

2
2/15/2012 7:16:20 PM
1871 Reputation 252 Total posts

I have files in both..
Base copies of the default template that comes with MonoX but modified.

webroot\App_Themes\Scene
webroot\App_Templates\Scene

MARKUP OF a HARD CODED PAGE.. works here but not in admin interface

<%@ Page
    Language="C#"
    AutoEventWireup="True"
    CodeBehind="Default.aspx.cs"
    Inherits="TheScene.Web.Default"
    Theme="Scene"
    MasterPageFile="/MonoX/MasterPages/ThePittsburghSceneHeader.master"
%>
         
<%@ MasterType TypeName="MonoSoftware.MonoX.BaseMasterPage" %>

Im My master.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
 
namespace TheScene.Web.MonoX.MasterPages
{
    public class ThePittsburghSceneHeader
    {
    }
}

Master MarkUp

<%@ Master
    Language="C#"
    AutoEventWireup="true"
    EnableTheming="true"
    Inherits="MonoSoftware.MonoX.MasterPages.DefaultSmallHeader"
    MasterPageFile="/MonoX/MasterPages/MonoX.master"
    Codebehind="ThePittsburghSceneHeader.master.cs" %>
<%@ MasterType VirtualPath="/MonoX/MasterPages/MonoX.master" %>

Im thinking maybe I am missing something here..
Works in hard code but dont work in admin interface inside MonoX.

inherit from the MonoX.master ?

3
2/17/2012 5:34:16 PM
15993 Reputation 2214 Total posts

Hi,

does your page inherits form the MonoSoftware.MonoX.BasePage as it should so MonoX can perform some internal operations. Also note that you need to provide the write permissions to PageTemplates folder so ScreenCapture preview mechanism can work properly.

Get back to us with the results.

Regards

4
2/27/2012 7:22:24 AM
1871 Reputation 252 Total posts

Hi Khorvat,

What page are you refering too ?
MonoSoftware.MonoX.BasePage ?

Maybe i am missing a step ?

ThePittsburghSceneHeader.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace TheScene.Web.MonoX.MasterPages
{
public class ThePittsburghSceneHeader
{
}
}

should I be inheriting here ?

5
2/25/2012 3:39:31 PM
15993 Reputation 2214 Total posts

Hi,

if we are talking about the Page templates you should create a aspx page in the folder I have mentioned (/App_Templates/YourThemeName/PageTemplates/YourPageTemplateName.aspx) and that page should inherit from the BasePage.

Can you check if we are on the same page or not ?

Regards  

6
This is a demo site for MonoX. Please visit Mono Software for more info.