Copied to clipboard

Flag this post as spam?

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


  • Anthony Candaele 1197 posts 2049 karma points
    Sep 11, 2013 @ 10:33
    Anthony Candaele
    0

    difference between Partial View and Partial View Macro File

    Hi, I'm working on my first Umbraco MVC project (v6.1.5) and it's all a bit new to me.

    Something that's not fully clear is the difference between Partial Views (under Section) and Partial View Macro File (under Developer)

    When to use one or the other?

    Thanks a lot for your help,

    Anthony

  • Anthony Candaele 1197 posts 2049 karma points
    Sep 11, 2013 @ 11:38
    Anthony Candaele
    0

    I'm asking this question because I want to implement subnavigation on a page, and I'm not sure wether to use a Partial View (settings section) or a Partial View Macro File (Developer section)

  • Jeroen Breuer 4909 posts 12266 karma points MVP 5x admin c-trib
    Sep 11, 2013 @ 11:45
    Jeroen Breuer
    101

    Doug just gave a nice explanation here: http://our.umbraco.org/forum/developers/razor/44664-Confused-over-when-DynamicNodeList-is-returned?p=0#comment160691

    You can read more about Partial views here: http://our.umbraco.org/documentation/Reference/Mvc/partial-views

    Sebastiaan already said there isn't much difference: https://twitter.com/cultiv/status/377728603028742144

    I think the main difference is that a partial view macro file can be used as a macro in the RTE and a normal partial view can't. It also has macro parameters.

    Jeroen

  • Anthony Candaele 1197 posts 2049 karma points
    Sep 11, 2013 @ 13:35
    Anthony Candaele
    0

    Hi Jeroen,

    Thanks! Good to know that Partial View Macro files come with parameters. Think I stick with the Partial View Macro files, as it's usage resembles most that of the 'old' Macro Script files.

    greetings,

    Anthony

  • Mark Gil Libres 24 posts 113 karma points
    Nov 18, 2014 @ 07:54
    Mark Gil Libres
    0

    you can also try my approach which is explained in detail here

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies