Problem installing Templates

May 7, 2012 at 10:55 AM

Hi, im trying to install a template to test this feature.
I downloaded mobileapps template, i uploaded it from page template. then i activated it.

but what i see is a blue page without any content.
Where's the wrong? :)

tnx to all
zak

May 8, 2012 at 5:30 AM

SageFrame Templating is all about switching designs. So the data(modules) associated with the templates are not installed rather only the necessary positions are created and the styles associated are uploaded. So you need to go to the PageModules section and drag the necessary modules and add the required data. To see what modules are to be placed in which position there is a template manual available as well which can be downloaded from http://sageframe.codeplex.com/releases/view/85400#DownloadId=364025

Moreover if you want the exact looks of the demo site, you can download it by clicking download button that appears on the top of the site http://mobapps.sageframe.com

Thanks

May 9, 2012 at 2:22 PM

Hi codesack,
  thank you very much for your answer! Its really usefull : )

I have another little question: is there a reason why Create Template doesn't work?

When i do Create Template, write a name and then click OK, i have from
http://cms.spbetting.com/Modules/LayoutManager/WebMethod.aspx/CreateTemplate

this json response:
{"Message":"There was an error processing the request.","StackTrace":"","ExceptionType":""}

Thank you for your time.

zak

May 9, 2012 at 3:48 PM

Hi zakwer,

i checked the "Create Template" issue as well and looks like there is some problem with the path. Here is a simple fix.

Open the /SageFrame/Modules/LayoutManager/WebMethod.aspx.cs page and go to "CreateTemplate" WebMethod.

Replace this

[WebMethod]
    public static void CreateTemplate(string filepath, string FolderName)
    {
        try
        {
           
            string completePath = HttpContext.Current.Server.MapPath(filepath + "/Templates/" + FolderName);
            string path = HttpContext.Current.Server.MapPath(filepath);

            DirectoryInfo SrcDir = new DirectoryInfo(path + "/Core/Blank/");
            DirectoryInfo DisDir = new DirectoryInfo(path + "/Templates/" + FolderName);
            CopyDirectory(SrcDir, DisDir);

        }
        catch (Exception e)
        {

            throw e;
        }
    }

With this and it should work just fine

[WebMethod]
    public static void CreateTemplate(string filepath, string FolderName)
    {
        try
        {
            if (filepath == "") filepath = "~/";
            string completePath = HttpContext.Current.Server.MapPath(filepath + "/Templates/" + FolderName);
            string path = HttpContext.Current.Server.MapPath(filepath);

            DirectoryInfo SrcDir = new DirectoryInfo(path + "/Core/Blank/");
            DirectoryInfo DisDir = new DirectoryInfo(path + "/Templates/" + FolderName);
            CopyDirectory(SrcDir, DisDir);

        }
        catch (Exception e)
        {

            throw e;
        }
    }

May 14, 2012 at 9:59 AM

Tnx codesack!

now it works :)
BuT... where can we manage exceptions and customize error message? I already opened that .cs but didnt understand where exception was thrown... :)

And... is there a list of allowed name for template placeholders? i see in header we can named them with no costrains, but in sfContent i can't create a placeholder with name="zakzak" :)

tnx a lot!
zak

May 16, 2012 at 6:43 AM

A few more details about Templating layout is given here