Can someone point out what should be used within a Partial View Macro Files?
Should I use "CurrentPage" or "Model.Content"?
What are the advantages and disadvantages?
@* Variante I *@ @foreach (var node in CurrentPage.Children()) {
<p>@node.Content</p>
}@* Variante II *@
@foreach (var node in Model.Content.Children()) {
<p>@node.Name</p>
}
Variante I: node is of type Umbraco.Web.Models.DynamicPublishedContent
Variante II: node is of type Umbraco.Web.Models.XmlPublishedContent
This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/42006-currentpage-vs-modelcontent