Copied to clipboard

Flag this post as spam?

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


  • Thomas 315 posts 602 karma points c-trib
    Jul 18, 2018 @ 15:05
    Thomas
    0

    Doctype grid editor - Models builder Dll

    • I'm using Doctype Grid editor til create some new items for the grid.

    • I also use Models builder in Dll mode.

    • I'm trying to pick an item from a folder with a Content picker.

    • I have a Doc type called "imageQuote" and "imageQuotePicker", where I can pick "imageQuote.

    How do I get the Image Quote - quoteTitle ex... I had a weird Idea that I could do it like this

    My View file for the grid editor:

        @inherits UmbracoViewPage<ImageQuotePicker>
        @using ContentModels = Umbraco.Web.PublishedContentModels;
        @{
             var quoteModel = new ContentModels.ImageQuotePicker(Model.Quote);
    
           <p>@quoteModel.quoteTitle</p>
    
        }
    
  • Thomas 315 posts 602 karma points c-trib
    Jul 18, 2018 @ 15:26
    Thomas
    0

    Is this a "wrong" way to do it?

    @inherits UmbracoViewPage<ImageQuotePicker>
    @{ 
        var image = Model.Quote.GetPropertyValue<IPublishedContent>("quoteImage");
    }
    @{
    <div class="section section--no-padding-bottom section--subsite">
    
        <!-- BACKGROUND -->
        <div class="fullwidth fullwidth--bg fullwidth--to-img" style="background: url('@((image != null) ? image.Url : "")')">
        </div>
    
        <div class="container">
            <div class="">
                <div class="scroll-element scroll-element--01">
                    <div class="row justify-content-end">
                        <div class="col-12 col-lg-5">
    
                            <!-- TXTBOX TRANSPARENT -->
                            <div class="txtbox txtbox--lg txtbox--to-small txtbox--transparent-pink">
    
                                <div class="txtbox_content">
                                    <div class="txtbox_content_title">
                                        <small>@Model.Quote.GetPropertyValue("quoteTitle")</small>
                                    </div>
    
                                    <div class="txtbox_content_header">
                                        <h2>@Model.Quote.GetPropertyValue("quoteHeader")</h2>
                                    </div>
    
                                    <div class="txtbox_content_text">
                                        <p>@Model.Quote.GetPropertyValue("quoteText")</p>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    } 
    
Please Sign in or register to post replies

Write your reply to:

Draft