Copied to clipboard

Flag this post as spam?

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

  • Sean Dooley 283 posts 522 karma points
    May 07, 2020 @ 14:22
    Sean Dooley

    Additional properties null when rendering

    I've setup a couple of grid editors using DTGE. When editing the values are persisting as expected.

    When rendering on the front-end, all but the first property is NULL.

    For example


    • Media | Media Picker
    • Aspect Ratio | Dropdown (value set in the CMS but NULL when rendering)
    • Title | Textstring (value set in the CMS but NULL when rendering)

    Any help would be appreciated.

    @inherits UmbracoViewPage<IPublishedElement>
      const string altTextAlias = "altText";
      const string aspectRatioAlias = "aspectRatio";
      const string mediaAlias = "videoId";
      var media = Model.Value(mediaAlias);
      if (media == null)
      var aspectRatio = Model.Value(aspectRatioAlias, fallback: Fallback.ToDefaultValue, defaultValue: "16x9");
      var altText = Model.Value(altTextAlias, fallback: Fallback.ToDefaultValue, defaultValue: null);
    <div class="grid-section__media flex">
      <div class="grid-section__video flex justify-center">
        <div class="video-embed-wrapper">
          <div class="video-embed aspect-ratio [email protected] aspect-ratio--loading" data-video-embed="@media">
            <figure class="aspect-ratio__object flex fade-out" data-video-embed-object="">
              <img class="object-fit-cover w-100" data-src="//" alt="@altText">
              <div class="absolute center">
                <div class="video-embed__play cp">
                  <div class="icon  icon--play">
                    <svg xmlns="" xmlns:xlink="" width="24" height="30" viewBox="0 0 24 30">
                      <g fill="none" fill-rule="evenodd" transform="translate(-14 -10)">
                        <mask id="h" fill="#fff">
                          <path d="M14.583 10.417v29.166L37.5 25z"></path>
                        <path fill="#000" d="M0 0h50v50H0z" mask="url(#h)"></path>

    Umbraco 8.5.4 DTGE 1.1.0

Please Sign in or register to post replies

Write your reply to: