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 All,
We have a template inheriting from UmbracoViewPage with model passed to it as shown in code snippet below.
@inherits Umbraco.Web.Mvc.UmbracoViewPage {Models.UserDetails}
This passed model have property such as “FirstName” passed.
We want to access this model value in Static content page. Is this possible if yes please let me know the technique to do it.
We tried it using macro but not able to access it.
Try this:
@using Models = Umbraco.Web.PublishedContentModels; @inherits Umbraco.Web.Mvc.UmbracoViewPage<Models.UserDetails> @Model.FirstName
Also reed this interesing article about Strongly typed vs. Dynamic Content Access by Dave Woestenborghs and you will quickly become a content access ninja. :) http://24days.in/umbraco/2015/strongly-typed-vs-dynamic-content-access/
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Accessing Model in static content page
Hi All,
We have a template inheriting from UmbracoViewPage with model passed to it as shown in code snippet below.
@inherits Umbraco.Web.Mvc.UmbracoViewPage {Models.UserDetails}
This passed model have property such as “FirstName” passed.
We want to access this model value in Static content page. Is this possible if yes please let me know the technique to do it.
We tried it using macro but not able to access it.
Try this:
Also reed this interesing article about Strongly typed vs. Dynamic Content Access by Dave Woestenborghs and you will quickly become a content access ninja. :) http://24days.in/umbraco/2015/strongly-typed-vs-dynamic-content-access/
is working on a reply...