Quantcast
Channel: Optimizely Search & Navigation
Viewing all articles
Browse latest Browse all 6894

Page with new page type from code can not be displayed

$
0
0

Hi,

I use EpiServer CMS version 10 and Web Forms.

I have created a page type in my code and I also have created a page for this page type.

When I start my webapplication EpiServer finds my new page type and I can see it in the CMS admin mode.

But when I create a new page with this page type I get an ArgumentNullException when I try to display it.

This line returns null.

UrlResolver.Current.GetUrl(content.ContentLink)

Episerver's databas table tblContentType has null in column Filename for my new page type. Other pages that work, seems to have a filename here and if I set this value manually it works fine. Shouldn't that value be set when Episerver scans for new page types?

My code looks like this:

namespace Portal.Epi.Structure.PageTypes.Vma
{
    [TemplateDescriptor(
        Path = "/Templates/Pages/Vma/VmaTemplate.aspx")]
    [ContentType(
        GUID = "340e80f7-75d6-41f3-9629-d0c1ea501164",
        DisplayName = "Abc...",
        Description = "Abc...",
        Order = 1100,
        AvailableInEditMode = true)]
    public class VmaPage : BasePageData
    {
    }
}
namespace Portal.Epi.Templates.Pages.Vma
{
    [TemplateDescriptor(Path = "~/Templates/Pages/Vma/VmaTemplate.aspx")]
    public partial class VmaTemplate : BasePage<VmaPage>
    {
       ......
    }
}

Thanks!


Viewing all articles
Browse latest Browse all 6894

Trending Articles