Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi
I just started to use ModelsBuilder and got a question.
How do I ouput inherited properties on the Masterpage template? For example "site name" that I usually have on the Startpage but put it in the Masterpage template.
Hi Ken,
You can use Umbraco helper for traversing over Umbraco tree. Read more - https://our.umbraco.org/documentation/reference/querying/umbracohelper/
For example getting typed root node -
var homeNodeTyped = Umbraco.AssignedContentItem.AncestorsOrSelf().First(x => x.Level == 1) as Site;
Thanks,
Alex
Yes, but then it's not strongly typed models anymore
Ken, why not?
You can cat IPublishedContent to ModelBuilder Class.
is working on a reply...
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.
Continue discussion
ModelsBuilder on Masterpage
Hi
I just started to use ModelsBuilder and got a question.
How do I ouput inherited properties on the Masterpage template? For example "site name" that I usually have on the Startpage but put it in the Masterpage template.
Hi Ken,
You can use Umbraco helper for traversing over Umbraco tree. Read more - https://our.umbraco.org/documentation/reference/querying/umbracohelper/
For example getting typed root node -
Thanks,
Alex
Hi
Yes, but then it's not strongly typed models anymore
Ken, why not?
You can cat IPublishedContent to ModelBuilder Class.
is working on a reply...
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.