Try our conversational search powered by Generative AI!

MVC Template not linking to page type.


I have a pagetype in a seperate assembly to my website, the pagetype is as follows


using System.ComponentModel.DataAnnotations;
using BaseContentTypes.Models.Blocks;
using EPiServer;
using EPiServer.DataAbstraction;

namespace BaseContentTypes.Models.Pages
    [AdaptiveContentType(GUID = "{3FF66761-4DF8-4D12-98DB-74402B0E586A}", DisplayName = "Article Page")]
    public class ArticlePage : TwoColumnPage
        [Display(Name = "Contributor",
          GroupName = SystemTabNames.Content,
          Order = 10)]
        public virtual string Contributor { get; set; }

        [Display(Name = "Profile Page",
          GroupName = SystemTabNames.Content,
          Order = 20)]
        public virtual Url ProfilePage { get; set; }

        [Display(Name = "Originally Published",
          GroupName = SystemTabNames.Content,
          Order = 30)]
        public virtual string OriginallyPublished { get; set; }

        [Display(Name = "View Zone",
          GroupName = SystemTabNames.Content,
          Order = 40)]
        public virtual LocaytaZoneBlock ViewZone { get; set; }


Alongside this I have a controller within my web project


using System.Web.Mvc;
using BaseContentTypes.Models.Pages;
using EPiServer.Web.Mvc;

namespace Wex.Web.Controllers
    public class ArticlePageController : PageController<ArticlePage>
        // GET: /ArticlePage/

        public ActionResult Index(ArticlePage currentPage)
            return View(currentPage);



Finally I have a Razor view

@model BaseContentTypes.Models.Pages.ArticlePage

    Layout = null;

<!DOCTYPE html>



The issue I have is that my site doesn't recognise that the pagetype has a template it can use for display.


Has anyone had this issue before and if so, how did you fix it?






Aug 08, 2013 15:30

What is the AdaptiveContentType attribute type?

Usally if it is not registred as a PageType, it is because the ContentType attribute is missing. I guess that EPiServer scans all assemblies for class with the ContentType attribute. I am not sure if i scans for classed with an attribute inherited from ContentType.

[ContentType(GUID = "{3FF66761-4DF8-4D12-98DB-74402B0E586A}", DisplayName = "Article Page")]

Edited, Aug 08, 2013 16:20

The page type is registered, it's just not picking up the MVC Template.

Aug 08, 2013 16:22

Aha ok, but might I ask anyway what is the AdaptiveContentType?

Aug 08, 2013 16:26

It's a custom ContentType which inherits from ContentTypeAttribute.

Aug 08, 2013 16:27
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.