Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jonas Eriksson 930 posts 1825 karma points
    Sep 03, 2014 @ 14:22
    Jonas Eriksson
    0

    Default RenderMvcController per domain, or one for multiple doctypes

    I have an installation with a couple of sites (siteA, siteB, siteC) and 20 or so document types (siteATextPage, siteBTextPage, siteCTextPage...)  

    Now I like to structure my views in subfolders. If I create custom controllers for each document type - I will get different paths for all document type views. /Views/SiteATextPage/ /Views/SiteBTextPage and so on.

    Which is okay. But this will mean I have to setup a controller for every documenttype. Right? 

    It might be nice to be able to add an attribute to make the controller hook up for multiple documenttypes. 

    [ForDocumentTypes("siteATextPage,siteANewsPage,siteAFoo")]
    public class SiteAController:RenderMvcController

    Or - one default controller per domain.

    Or - would I accomplish this (fairly) easily by setting up custom routes (+ one controller per domain)?

Please Sign in or register to post replies

Write your reply to:

Draft