Hello
This error come to the front end When I try to print nested content in a partial view.
Umbraco.Web.Models.DetachedPublishedContent' does not contain a definition for 'GetPropertyValue'
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@{
var ClientPage = Umbraco.Content(1151);
string lang = Request.RawUrl.ToString().Contains("/en/") ? "en" : "ar";
string locale = lang == "ar" ? "Arabic" : "English";
var setCulture = lang == "en" ? "en-Us" : "ar-SA";
Culture = UICulture = setCulture;
}
@{
var clientsList = ClientPage.clients;
if (clientsList != null)
{
foreach (var client in clientsList)
{
var clientImage = client.GetPropertyValue<IPublishedContent>("logo");
IPublishedContent category = client.GetPropertyValue<IEnumerable<IPublishedContent>>("category").First();
//@umbraco.library.GetPreValueAsString(@client.GetPropertyValue("categoryEn"))
<div class='col-md-3 col-sm-4 col-xs-6 text-center scale-anm @category["code"] all'>
<div class="client-img-container d-flix justify-content-center align-items-center">
<img src=" @clientImage.Url" alt=''>
</div>
</div>
}
}
}
Nested Content in partial view
Hello This error come to the front end When I try to print nested content in a partial view. Umbraco.Web.Models.DetachedPublishedContent' does not contain a definition for 'GetPropertyValue'
Hi Reham
Can you use this code:
instead of
instead of:
is working on a reply...