Copied to clipboard

Flag this post as spam?

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


  • Craig O'Mahony 364 posts 918 karma points
    Jul 16, 2015 @ 14:41
    Craig O'Mahony
    0

    Building a page in sections (MVC Partials)

    Hi Folks,

    I wonder if someone could help me please....I'm just starting out in MVC and I've been asked to build a page (VS2013, MVC4 and Umbraco 7) in the following format. Basically I need to build a page in contains an accordion with 4 levels.

    The first level is built from what's incoming off the querystring (going off to the Umbraco backoffice and getting some node data) and displays to the user a radiobutton list. I done this part insomuch that I getting the data in the controller and returning this IEnumerable to the View and displaying it to the user.

    My problem is that the level 2 should be populated with what the user has selected in level 1 (and level 3 from what they were to select in level 2, etc.) and I just don't know how to go about building this.

    I can't really put any code examples up as I don't know what to start writing (!) could anyone point me in the right direction or tell me what structure I need to start building in my page please?

    thanks, Craig

  • Dave de Moel 122 posts 574 karma points c-trib
    Jul 17, 2015 @ 14:12
    Dave de Moel
    0

    My guess is it would be easiest to use some KnockoutJS to make the accordion work smoothly. Here is a tutorial that basically shows how to use tabs: http://learn.knockoutjs.com/#/?tutorial=webmail

    When done with the tutorial, try to make it so that a "Mail" tab gets selected when opening a mail, and you'll have exactly what you describe in your post.

  • Craig O'Mahony 364 posts 918 karma points
    Jul 21, 2015 @ 08:49
    Craig O'Mahony
    0

    Hi mate,

    Cheers for the reply I managed to get around it by using multiple ajax calls on multiple partial views so it's all good.

    I will have a look at that tutorial though.

    Thanks, Craig

Please Sign in or register to post replies

Write your reply to:

Draft