Copied to clipboard

Flag this post as spam?

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


  • Sonja 133 posts 621 karma points
    Sep 24, 2018 @ 11:48
    Sonja
    0

    problem setting the value of the model

    Hi I have this code:

        @inherits Umbraco.Web.Mvc.UmbracoViewPage<ContentModels.TwoColumnPage>
    @using ContentModels = Umbraco.Web.PublishedContentModels;
    
    @{
        ViewBag.Title = "...";
        Layout = "...";
    }
    <div class="container">
        <div class="row">
            <div class="col-sm-12 col-lg-6">
                One of 2 columns
            </div>
            <div class="col-sm-12 col-lg-6">
                @Html.Partial("~/Views/Partials/Right.cshtml",
            new myNamespace.Models.myContentList()
            {
                Target=Model.Content.target,
    
                Text=Model.Content.SomeText,
                somelist=Model.Content.Somelist
            }
            )
            </div>
    
        </div>
    </div>
    

    The problem is with the class. First TwoColumnPage is not recognized. This is actualy my Document Type. Then Model.Content doesn't contain target, someList and sometext.

    Please advice how to fix this

  • 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