Copied to clipboard

Flag this post as spam?

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


  • Robert 27 posts 226 karma points
    Jan 23, 2014 @ 17:41
    Robert
    0

    Hijacking controller, action for content page

    Hi,

    Been trying to get some sense into this.

    Have been working with ASP.Net MVC for some years now and don't know if this is my problem, trying to do things in similar in Umbraco.

    However, my site got the following structure.

    Web
    | Home
    | About
    |  - Extra1
    |  - Extra2
    | Contact
    

    Home has its own document type and template, called "Home".

    About, Extra1 and Extra2 is all of the same document type and template, called "MenuLeft".

    When home is requested the "HomeController" and action "Home" is called, no problems there, but when "About", "Extra1" and "Extra2" is requested the "MenuLeftController" with the action "MenuLeft" is called.

    What i want is that action "About" is called when page content "About" is requested and so on.

    The reason i´m doing it this way is for my views to have typed models.

    Am i thinking this backwards or is this the preferred way?

    Best regards

    Robert

  • Charles Afford 1163 posts 1709 karma points
    Feb 01, 2014 @ 14:49
    Charles Afford
    0

    Yea you should be able to do this :).  Why do you need your views to have stronly typed models?  Its a way but while you have st models you now have a ton of controllers and actions?  Charlie :)

  • Robert 27 posts 226 karma points
    Feb 16, 2014 @ 16:34
    Robert
    100

    Hi Charlie,

    Yeah, well, for this site its not that many doc types nor templates which makes it quite easy to maintain.

    //Robert

  • Robert 27 posts 226 karma points
    Feb 16, 2014 @ 16:37
    Robert
    0

    Figures my question was in the right direction and marks this thread as resolved.

    //R

  • Charles Afford 1163 posts 1709 karma points
    Feb 16, 2014 @ 17:43
    Charles Afford
    0

    Ok :)

Please Sign in or register to post replies

Write your reply to:

Draft